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
saukulkarni22
Frequent Visitor

Cumulative % calculation

Hi

 

I am working on data which requires cumulative % in column. 

 

saukulkarni22_2-1657795088089.png

 

Output required:

I am looking to add % week on week to get below output.

eg: In below table 2019 Actual for week 2 measure should show 33.49% which is addition of 14.30 + 19.19 (from table above) and so on

 

saukulkarni22_4-1657795285461.png

I have tried multiple ways but end up in creating % column which gives me cumulative % that adds up to 100% but not like above.

 

Can anyone help?

 

Regards

 

 

 

2 REPLIES 2
saukulkarni22
Frequent Visitor

Hello,

 

Thank you for the reply. However I am not able to write week number measure/column in my table due to RANKX. I can't see RANKX in my power BI. Can you think of any reason?

 

Regards

amitchandak
Super User
Super User

@saukulkarni22 , You can use Week Number of week Rank, better it come from a separate date/week table

 

example measure

 

CALCULATE(AverageX(Values(Date[Week Rank] ), [Your Mesure]), FILTER(ALL('Date'), 'Date'[Week Rank]<=max('Date'[Week Rank])))

 

or

 

CALCULATE(AverageX(Values(Date[Week number] ), [Your Mesure]), FILTER(ALL('Date'), 'Date'[Week number]<=max('Date'[Week number])))

 

You can use allselected in place of all

 

CALCULATE(AverageX(Values(Date[Week Rank] ), [Your Mesure]), FILTER(ALLselected('Date'), 'Date'[Week Rank]<=max('Date'[Week Rank])))

CALCULATE(AverageX(Values(Date[Week number] ), [Your Mesure]), FILTER(ALLselected('Date'), 'Date'[Week number]<=max('Date'[Week number])))

 

 

Week rank column

Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

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.