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
Anonymous
Not applicable

Accumulate % for current month

I have a measure that calculates a % for each day based on a division of two column from a table, I want to show an accumulated % for current month, for example december, from 1st to the 16th... is it possible? I'm guessing doing a measure with the sum of the two tables just for the current month. Does it makes sense?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

For cumulative like this

 

Cummalative mtd = TOTALmTD(sum(Sales[Sales Amount]),filter(all(Sales[Sales Date]),Sales[Sales Date]<=maxx('Date',('Date'[Date]))))
	

 

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 Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

For cumulative like this

 

Cummalative mtd = TOTALmTD(sum(Sales[Sales Amount]),filter(all(Sales[Sales Date]),Sales[Sales Date]<=maxx('Date',('Date'[Date]))))
	

 

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 Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Anonymous
Not applicable

@amitchandak  I accept your solution, I figured it out thanks to your help... and the help of the people on the other posts... 

 

CumulativeOTD2 = TOTALMTD([OTD], Dates[Date], Dates[IsCurrentMOnth])

 

Anonymous
Not applicable

thanks for your reply @amitchandak , if I understood correctly I translate the formula to my needs like this:

 

CumulativeOTD = TOTALMTD(SUMX('OTD RAW DATA', [Ontime Lines]/[Late Lines]), FILTER(ALL(Dates[Date]), Dates[Date]<=MAXX(Dates, Dates[Date])))

 

I don't think I'm doing it right because when I put a card visual I get "infinity" 😞  

 

I have tried solutions proposed on these post but with no positive result:

 

Measure-for-Current-Month  

Sumif-between-two-tables 

use didvide([Ontime Lines],[Late Lines]) and see if still have the issue

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.