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

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.

Reply
Pikachu-Power
Post Prodigy
Post Prodigy

cumulative sum and sum over years

Hello everybody,

 

i have the following measure and table:  

 

Unbenannt.PNG

 

At the end i change it to a bar chart. When I select 2020 in my slicer and drillup to quarter, year everything is ok. I always get the last value I want. 

 

Problem: when I select 2020 and 2019 in the slicer I want to see the sum of the both years. For example 100+1300=1400 in the bar chart for january. And the same for the quarter. The years are all right beacause i have the split of the years in the bar chart.

 

is that possible? 

4 REPLIES 4
amitchandak
Super User
Super User

@Pikachu-Power , As far as what I got.

Use Allselected(Calendar) In place of all(Calendar)

Same behaviour. Only the cumulative sum ignores the years before 2019...

@Pikachu-Power , I tried teh same stuff on my data. I just made sure that Year, qtr, and month are coming from the Calendar table and that table is marked as date table

 

Screenshot 2020-10-09 12.26.36.png

hello amitchandak,

 

The cumulative sum is not the problem. That works.

 

But when I select 2019 and 2020 in a slicer I want to see the sum of the month january 2019 and january 2020 and so on. In your case for example 13.802.944,02 for january.

 

ALLSELECTED dont work here.

 

As a comparison I have a column with already calculated cumulative sum for month and there I use 

CALCULATE(COUNT(Table1[Dates]),
FILTER(Calender, Calender[Month_Number] = MAX(Calender[Month_Number])))
Here I get what I want... the sum of the month when I select 2019 and 2020. may it is possible
to transfer this idea?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.