Forum Discussion
Anonymous
5 years agoNot applicable
DAX
Hi, I need to calculate sum of $ amounts in column X based on condition GroupBy in column Y, Z. Ex: X Y Z $5 A IND $6 A US $7 B US $8 ...
- 5 years ago
Hi Anonymous ,
According to your description, create the following virtual table.
Out_result = SUMMARIZE ( ABC, ABC[GL Description], "A", IF ( NOT ISBLANK ( CALCULATE ( SUM ( ABC[YTD] ), FILTER ( ALL ( ABC ), MAX ( ABC[GL Description] ) = ABC[GL Description] && ABC[Group] = "CA" ) ) ), CALCULATE ( SUM ( ABC[YTD] ), FILTER ( ALL ( ABC ), MAX ( ABC[GL Description] ) = ABC[GL Description] && ABC[Group] = "CA" ) ), 0 ) )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hello,
I am trying to calculate sum based on columns from two different tables (Actuals & MYR). I am getting the correct output for YTDActuals. But, for "YTD MYR" its not. I used the below formula for YTD Actuals:
YTD Actuals = CALCULATE(SUMX(Actuals,Actuals[Doc Amt (USD)])). But, when I am using similar formula with reference to table "MYR" and specific column in the table, its giving total sum (same for all rows) instead of giving for each row category. Any help is greately appreciated.
Note: I mapped the tables Actuals & MYR based on common columns.