Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

How to display the same cumulative value on one month?

Hello,

I am trying to display same cumulative value of one month by selecting one month from a filter.

 

I have attached my Pbix file.

JustinDoh1_0-1646335824676.png

 

As illustrated, currently, cumulative value of March 2022 is 35 M.

But, when I select only one month from the Date Range slicer, I get different amount (11.4 M):

JustinDoh1_1-1646335923194.png

I think I might have to fix the measure for CumSales, and I need your help.

CumSales =
      CALCULATE(
                       SUM(Revenue[Amount]),
                               filter(allselected('Calendar'),
                               'Calendar'[Date] <=max('Calendar'[Date])
                             )
                        )
 
Thanks.
 
1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hi:

This should work! I jsut tested. Using ALL is good when dates are involved.

CumSales 2 = CALCULATE(SUM(Revenue[Amount]),filter(all('Calendar'),'Calendar'[Date] <=max('Calendar'[Date])))

View solution in original post

2 REPLIES 2
Whitewater100
Solution Sage
Solution Sage

Hi:

This should work! I jsut tested. Using ALL is good when dates are involved.

CumSales 2 = CALCULATE(SUM(Revenue[Amount]),filter(all('Calendar'),'Calendar'[Date] <=max('Calendar'[Date])))

I also makred your Calendar as Date Table.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors