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,
Can someone throw some light on the implementation of the below scenario.
UID | Value | Expected Result | Formula for Math |
1 | 100 | 100 | =Value(1) |
2 | 20 | 20 | =Value(2) |
3 | 120 | =Value(1)+Value(2) | |
4 | 200 | 200 | =Value(4) |
5 | 320 | =Value(3)+Value(4) | |
6 | 750 | 750 | =Value(6) |
Thanks in advance.
@Anonymous Try this measure:
Sorry to trouble you. Am I doing anything wrong here? I am unable to get the same value as you get.
Formula =
VAR value1_ = CALCULATE(SUM(TableZ[Value]),TableZ[UID]=1)
VAR value2_ = CALCULATE(SUM(TableZ[Value]),TableZ[UID]=2)
VAR value3_ = CALCULATE(SUM(TableZ[Value]),TableZ[UID]=3)
VAR value4_ = CALCULATE(SUM(TableZ[Value]),TableZ[UID]=4)
VAR value5_ = CALCULATE(SUM(TableZ[Value]),TableZ[UID]=5)
VAR value6_ = CALCULATE(SUM(TableZ[Value]),TableZ[UID]=6)
RETURN SWITCH(MAX(TableZ[UID]),
1, value1_,
2,value2_,
3, value1_+value2_,
4, value4_,
5, value3_+value4_,
6, value6_)
@Anonymous Create the measure not column.
If its a measure, I get the same values.
@Anonymous , what is the data type of UID? is it a numeric value or text ?
@Anonymous But i am not getting any issue that;s why I attached with screen shot.
@Anonymous I am attaching PBIX file for your reference.
@Tahreem24 , Thanks for the report. Understood what went wrong. I was having VALUE column in 'Dont Summarize', that should be in Summarize.
Besides, for UID=5, it should be Resultant(UID3)+UID4
Hi @Anonymous ,
Create a calculated column like this
Please accept this as a solution if your question has been answered !!
Appreciate a Kudos 😀
Thanks for your efforts.
I might have missed this. But, the summation is not always with EARLIER cell value or <= case.
It could beRow 3= Row1+Row2,
Row 9 = Row 2+Row7,
Row 10 = Row7+ Row9
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |