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 Community,
Can you please help me with following problem.
I have created a measure that is adding new rows to table with condition. I want to use that measure to calculate cumulative total.
Here is created measure :
Solved! Go to Solution.
Hi, @sam_hoccane
Please try formula like:
Cummulative Total =
VAR tab =
ADDCOLUMNS ( ALLSELECTED ( 'Table (2)' ), "Measure Value", [Measure Value] )
RETURN
SUMX (
FILTER ( tab, 'Table (2)'[Year Month] <= MAX ( 'Table (2)'[Year Month] ) ),
[Measure Value]
)
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @sam_hoccane
Please try formula like:
Cummulative Total =
VAR tab =
ADDCOLUMNS ( ALLSELECTED ( 'Table (2)' ), "Measure Value", [Measure Value] )
RETURN
SUMX (
FILTER ( tab, 'Table (2)'[Year Month] <= MAX ( 'Table (2)'[Year Month] ) ),
[Measure Value]
)
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@sam_hoccane , Try like
Cummulative Total = calculate(SUMX( values('table'[Year Month]),[Measure Value] )
,FILTER (ALLSELECTED('table') , 'table'[Year Month]<=MAX('table'[Year Month] )))
better to use a date table
Cummulative Total = calculate(SUMX( values('Date'[Year Month]),[Measure Value] )
,FILTER (ALLSELECTED('Date') , 'Date'[Year Month]<=MAX('Date'[Year Month] )))
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 |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |