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.
Hello, everybody!
I have the following problem, I need to accumulate value from lowest to highest taking into account 2 columns (Route and Supplier).
I need to get the "Accumulative" column:
Route | Supplier | Value | Accumulative |
1 | A | 2 | 2 |
1 | C | 5 | 7 |
1 | B | 6 | 13 |
2 | C | 1 | 1 |
2 | A | 5 | 6 |
2 | B | 6 | 12 |
Is there a way to do this?
Thanks!
Regards!
Solved! Go to Solution.
Hi @tutuk28 ,
You can create two calculated columns as below to achieve it:
Rank = CALCULATE(COUNTROWS('Accumulate'),ALLEXCEPT('Accumulate','Accumulate'[Route]),'Accumulate'[Value] < EARLIER('Accumulate'[Value]))+1
Accumulative = CALCULATE(SUM('Accumulate'[Value]),FILTER(ALL('Accumulate'),'Accumulate'[Route]=EARLIER('Accumulate'[Route])&&'Accumulate'[Rank]<= EARLIER('Accumulate'[Rank])))
Best Regards
Rena
Hi @tutuk28 ,
You can create two calculated columns as below to achieve it:
Rank = CALCULATE(COUNTROWS('Accumulate'),ALLEXCEPT('Accumulate','Accumulate'[Route]),'Accumulate'[Value] < EARLIER('Accumulate'[Value]))+1
Accumulative = CALCULATE(SUM('Accumulate'[Value]),FILTER(ALL('Accumulate'),'Accumulate'[Route]=EARLIER('Accumulate'[Route])&&'Accumulate'[Rank]<= EARLIER('Accumulate'[Rank])))
Best Regards
Rena
Hi @tutuk28 ,
There is an existing thread for the similar scenario. Check this:
https://community.powerbi.com/t5/Desktop/Summarize-and-Rank-by-multiple-columns-and-rows/td-p/330108
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |