cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MIchri
Resolver I
Resolver I

Cumulative measure over month

Hi, 

I have the following measure: 

Fraværsdagsværk pr. årsværk_total = (CALCULATE(SUM('Datasæt - Power BI - statistik'[Timer]);'Datasæt - Power BI - statistik'[Sygdomsvarighed] = "Korttidssygdom" || 'Datasæt - Power BI - statistik'[Sygdomsvarighed] = "Langtidssygdom") / 7,4 / (SUM('Datasæt - Power BI - statistik'[Antal medarbejdere])))

This gives me an average I can split into month. 

Now, I want to make a cumulative measure over month (except the first month). 

I have tried a bunch of different meaures without success. 

Thanks, 

Mikkel 
1 ACCEPTED SOLUTION

HI @V-lianl-msft ,

Thanks for your answer!

I believe your measure works but the real problem is my dataset, which is realyy not structured for several reasons. I end up using the waterfall chart to do a cumulative sum over the month. 

Thank, 
Mikkel

View solution in original post

3 REPLIES 3
V-lianl-msft
Microsoft
Microsoft

Hi @MIchri ,

 

Based on your description, there may be a column of date data in the table. The first condition is not to calculate from the first month .You can try a DAX similar to this:

 

Measure 2 = CALCULATE (Measure1,FILTER (table, 'Calendar'[Date] >MIN ( 'table'[Date] ) )

 

If you don't get the results you want, please provide some sample data so that we can help you more effectively.

 

Best Regards,

Liang 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI @V-lianl-msft ,

Thanks for your answer!

I believe your measure works but the real problem is my dataset, which is realyy not structured for several reasons. I end up using the waterfall chart to do a cumulative sum over the month. 

Thank, 
Mikkel

View solution in original post

Hi @MIchri,

 

It's glad that you have solved your problem.
Please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

Best Regards,

Liang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power BI User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.