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;
I have wrote a measure to calculate the cumulative sum of Revenue, till the month before from the current month.
I am able to get the revenue for all the previous months but I am not getting it as a cumulative value.
I have used following measure
RevenueActual = CALCULATE(sum(Revenue[RevenueInGBP]),filter(Revenue, Revenue[Sale/Purchase]="Sales" && Revenue[Month]< EOMONTH( today(),-1)))
Please help me how should I proceed to get the cumulative value.
Thanks
Solved! Go to Solution.
Hi avinrosh,
Are you trying to achieve the accumulate total of each row which can meet your conditions? If so, modify you measure like this pattern and check if it can work:
RevenueActual = VAR last_month = EOMONTH ( MAX ( Revenue[Month] ), -1 ) RETURN CALCULATE ( SUM ( Revenue[RevenueInGBP] ), FILTER ( Revenue, Revenue[Sale/Purchase] = "Sales" && Revenue[Month] < last_month ) )
Hope it's helpful.
Jimmy Tao
Hi avinrosh,
Are you trying to achieve the accumulate total of each row which can meet your conditions? If so, modify you measure like this pattern and check if it can work:
RevenueActual = VAR last_month = EOMONTH ( MAX ( Revenue[Month] ), -1 ) RETURN CALCULATE ( SUM ( Revenue[RevenueInGBP] ), FILTER ( Revenue, Revenue[Sale/Purchase] = "Sales" && Revenue[Month] < last_month ) )
Hope it's helpful.
Jimmy Tao
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 |
---|---|
105 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |