So my question is, how can divide figures in one column to a specific "cell". I am sure that there is a dax formula that can do this just not sure which. Please help.
Thanks.
Here are some articles describing how to calculate subtotals values with DAX in PBI.
https://powerpivotpro.com/2013/07/writing-a-subtotal-calc-column-aka-the-simplest-use-of-the-earlier-function/
https://powerpivotpro.com/2012/03/subtotals-and-grand-totals-that-add-up-correctly/
Related
I have a situation where I want to do a "recursive" calculated column from the values of another column.
Example, Is there a way can I get this "Y" column from "X" column values using DAX in PowerBI?
Because I wanna do some similar to this
https://www.youtube.com/watch?v=ojnpFz-Mr8Y&t=2s
but I need a similar "sub_doc" column generated with DAX functions, in this example "Y" column.
I tried many combinations of DAX and nothing :(
Can anyone help me?
I have a measure which is the sum of 2 other columns. How do I take the latest value of that measure? is it possible? I've seen examples but it seems you can only do it if it's a column.
thanks!
Erik
I'm struggling to find a way to create a column in Powerbi that is calculated with the previous row of same column. I've seen similar questions in this forum (namely, How to perform sum of previous cells of same column in PowerBI and DAX - formula referencing itself) and I tried to adapt the indicated solutions to my case but without sucess.
Is it possible to create a calculated column with DAX that replicates what i'm doing in excel? or is it one of those cases that is not possible to create a closed-form formula?
excel example
Many thanks,
Paul
I'm new to tableau. my question is, is DAX from Power BI same as LOD in Tableau?
It'd be great if someone could help me with an explanation for this.
thanks in advance!
There are similarities for sure. In Excel it can be a way to display a value that is unaffected by filtering.
LODs are similar in that you can fix your value.
For example, if I want to know the total sales in a workbook regardless of what row/column the value is on, I could use a FIXED LOD expression:
{FIXED : SUM([Sales]}
If you put the above on Label and a Month dimension on rows, it will ignore the segmentation of months and display the total sum of sales for the entire workbook.
You can choose to fix on a different level of detail to achieve a different result:
{FIXED [Month] : SUM([Sales]}
If you put the above on Label and a month and date dimension on rows it will display the total sum of sales for each month, and ignore the date. And so on...
They're somewhat tricky to get used to, but they come up a lot in more complex workbooks.
I would put it this way, the DAX language is at least as powerful as Tableau expressions (involving LOD or otherwise). That is, if you can do it with Tableau LOD, then there's also a way to write something equivalent with DAX.
I need some help with a dax measure. Below you see a matrix in Power BI Desktop. What I want is to calculate the ratio of the Sum(of 0 and 1 level) divided by the measure [Total Salg vekt], which I already has calculated. But I am struggling getting the sum of the second level of my product hierarchy. I don't want to calculate level 1 or 3 in the hierarchy.
My hierarchy is located in my Product table and is named like this
Products
- Category
- Code
- SubCategory
Can any of you show a dax code that my work as described above?
Thanks
Regards Geir
I have bad news:
There's no hierarchy in DAX.
You'll have to use different filters in order to achieve what you want.
Complete explanation is in here:
https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/
And yes, it is not simple, but it answer your question.