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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Atifz
Frequent Visitor

Reverse Cumulative measure

Hi all,

 

I am trying to create a reverse cumulative measure and I am having difficulty when there are blanks in my data. 

 

Using this calculated measure, I get the table below, but where there are blanks, the value comes out as the total.

 

Cumulative =

CALCULATE (
'Registrations'[Registrations],
FILTER(
ALL( 'Registrations'[DaysDiff]),
                'Registrations'[DaysDiff] >=MAX('Registrations'[DaysDiff])))

 

DaysDiffRegistrationsCumulative
0134460
185326
249241
347192
434145
527111
61184
71773
81756
91139
101328
11315
12112
13 460
14 460
15311
1628
1726
18 460
19 460
2014
21 460
22 460
23 460
2433

 

Can anyone help me modify the calculation, so on the days where there are blank registrations, the cumulative column just takes the value above. I don't want to get rid of the blank rows, as I need all the daysdiff there.

 

The model I am using can only create calculated measures and not columns.

 

The final table should look like the below:

 

DaysDiffRegistrationsCumulative
0134460
185326
249241
347192
434145
527111
61184
71773
81756
91139
101328
11315
12112
13 12
14 12
15311
1628
1726
18 6
19 6
2014
21 4
22 4
23 4
2433

 

Thanks

 
9 REPLIES 9
amitchandak
Super User
Super User

Check

reverse cumm = 
var _cumm =CALCULATE (
sum('Registrations'[Registrations]),
FILTER(
ALL( 'Registrations'[DaysDiff]),
                'Registrations'[DaysDiff] <=MAXX(all('Registrations'),'Registrations'[DaysDiff])))
var _ear =CALCULATE (
sum('Registrations'[Registrations]),
FILTER(
ALL( 'Registrations'[DaysDiff]),
                'Registrations'[DaysDiff] <=MAX('Registrations'[DaysDiff])-1))
return
_cumm -_ear

 

There is minor diff, please check

Solution link :https://www.dropbox.com/s/dvrkkmupwk4r7fz/ReverseCumm.pbix?dl=0

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

hi @amitchandak,

 

I get an error at this part in in both of the rows.

sum('Registrations'[Registrations])

 

If it helps, [Registrations] is a measure made from CountA([BidderID]), where BidderID is a string.

 

Thanks

Try using CountA([BidderID]) or [Registrations], in place of Registrations[Registrations]

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

hi @amitchandak 

 

It doesn't let me put the CountA in the Sum, but if I replace the whole row with it, I get the same results as the beginning, with the rows with blank showing 460

Share sample of data in your original data format

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

hi @amitchandak ,

 

My data model is from analysis services. How would I be able to share sample data?

Hi @Atifz ,

 

Export to excel removing any Confidential Information and share your DAX formuals here. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
parry2k
Super User
Super User

@Atifz try changing following

 

  MAX('Registrations'[DaysDiff] <= 'Registrations'[DaysDiff]

 

 Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Atifz
Frequent Visitor

Hi @parry2k ,

 

Sorry, I am quite new to Power BI. Could you please clarify what I need to change and what the full measure should be.

 

Thanks

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors