Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello to all !
I have the following problem:
I have a measurement that is calculated from two others. With this measure, I get the ranking according to projects. I would like to have the cumulative value. For that, I am using this formula which is not really useful for me :
**bleep** sale = CALCULATE([Sale], TOPN(RANKX(ALL(Proyect[Name]), [Sale],,,Skip),ALL(Proyect[Name]), [Sale]))
This is what I have
and this is what I need
help with this please.
Solved! Go to Solution.
Hi, @elaadani
May I ask if this is the expected output you are looking for? Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
Cumulative =
VAR CurrentRank = [Ranking]
RETURN
IF (
HASONEVALUE ( 'Table'[Name] ),
SUMX (
FILTER (
ALLSELECTED('Table'),
[Ranking] <= CurrentRank
),
[Sale]
),
SUMX (ALLSELECTED('Table'),[Sale] )
)
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @elaadani
May I ask if this is the expected output you are looking for? Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
Cumulative =
VAR CurrentRank = [Ranking]
RETURN
IF (
HASONEVALUE ( 'Table'[Name] ),
SUMX (
FILTER (
ALLSELECTED('Table'),
[Ranking] <= CurrentRank
),
[Sale]
),
SUMX (ALLSELECTED('Table'),[Sale] )
)
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Exactly what I needed. Thank you very much for your help and your time!
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file whether it suits your requirement.
Sales measure: =
SUM(Data[Sales])
RANK function (DAX) - DAX | Microsoft Learn
Rank measure: =
RANK (
SKIP,
ALL ( Data[Name] ),
ORDERBY ( [Sales measure:], DESC, Data[Name], DESC )
)
WINDOW function (DAX) - DAX | Microsoft Learn
Cumulate sales measure: =
CALCULATE (
[Sales measure:],
WINDOW ( 1, ABS, 0, REL, ALL ( Data[Name] ), ORDERBY ( [Rank measure:], ASC ) )
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |