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.
@Ashish_Mathur helped me this yesterday. it works great but I want to sum the max_amt column by group.
Currently it picks up larger value between amt1 and amt2.
as an example below, it should be 1600, not 1550.
Product ID | Line No | Amt1 | Amt2 | Max_Amt | |
PP89 | 1 | 250 | 100 | 250 | |
2 | 500 | 550 | 550 | ||
3 | 800 | 500 | 800 | ||
Total | 1,550 | 1,150 | 1,600 |
Thank you,
Solved! Go to Solution.
Hi @topazz11 ,
You can create measure like DAX below.
Max_Amt =
VAR Amount1 = if(HASONEVALUE(Append1[Attribute]),[Total],MAXX(VALUES(Append1[Attribute]),[Total])) VAR _table = SUMMARIZE(Append1, Append1[Area],Append1[Prod ID],Append1[Line No],"_Value",[Amount1]) RETURN IF(HASONEVALUE(Append1[Line No]),[Amount1],SUMX(_table,[_Value]))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @topazz11 ,
You can create measure like DAX below.
Max_Amt =
VAR Amount1 = if(HASONEVALUE(Append1[Attribute]),[Total],MAXX(VALUES(Append1[Attribute]),[Total])) VAR _table = SUMMARIZE(Append1, Append1[Area],Append1[Prod ID],Append1[Line No],"_Value",[Amount1]) RETURN IF(HASONEVALUE(Append1[Line No]),[Amount1],SUMX(_table,[_Value]))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |