Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello to everybody,
Problem:
Grand Total not equal to rows gotten by if statement.
Dax for Column "Sutarčių vertė":
Solved! Go to Solution.
This is a very common issue that you face in DAX. The grand total in DAX doesn't work like excel where it would go and add the values in the column.
Each cell is calculated independently by DAX, including the grand total value.
The result from the dax formula you wrote is correct. To understand, you need to look at the calcuation in the grand total line.
As per the fomula, if [Projekto vertė PTD] is null or blank, give [Pagrindinės veiklos pajamos] else [Projekto vertė PTD].
Now the value for [Projekto vertė PTD] for the grand total line is 561,537.00. It is not blank or null, therefore, the result of this dax formula will be 561,537. and not 430.568 as you expect
To overcome this issue, you need to use SUMX to make sure that the grand total adds up to the individual cells.
An example of that would be
sumx([Table], if(or([Projekto vertė PTD]=0;ISBLANK([Projekto vertė PTD]));[Pagrindinės veiklos pajamos];[Projekto vertė])
This is a very common issue that you face in DAX. The grand total in DAX doesn't work like excel where it would go and add the values in the column.
Each cell is calculated independently by DAX, including the grand total value.
The result from the dax formula you wrote is correct. To understand, you need to look at the calcuation in the grand total line.
As per the fomula, if [Projekto vertė PTD] is null or blank, give [Pagrindinės veiklos pajamos] else [Projekto vertė PTD].
Now the value for [Projekto vertė PTD] for the grand total line is 561,537.00. It is not blank or null, therefore, the result of this dax formula will be 561,537. and not 430.568 as you expect
To overcome this issue, you need to use SUMX to make sure that the grand total adds up to the individual cells.
An example of that would be
sumx([Table], if(or([Projekto vertė PTD]=0;ISBLANK([Projekto vertė PTD]));[Pagrindinės veiklos pajamos];[Projekto vertė])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
20 | |
20 | |
16 | |
15 |
User | Count |
---|---|
46 | |
28 | |
25 | |
18 | |
17 |