Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
hi, i have datas that look like the following example:
i need to add another column to the graph with a cumulative sum of the "value" column but it has to restart from 0 on every subcategory (SCAT). i can't figure out how to do it, can someone help pls?
Solved! Go to Solution.
@Samuele_M , Try to use window function
Cumm Based on subcategory= CALCULATE([Your measure], Window(1,ABS,0,REL, ALLSELECTED('Table'[Category],'Table'[subcategory]),ORDERBY('Table'[subcategory],asc),,partitionBy('Table'[Category])))
Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f
@Samuele_M , Try to use window function
Cumm Based on subcategory= CALCULATE([Your measure], Window(1,ABS,0,REL, ALLSELECTED('Table'[Category],'Table'[subcategory]),ORDERBY('Table'[subcategory],asc),,partitionBy('Table'[Category])))
Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f
Ty!! this works but i have so many subcategories that it takes few minutes to load; is there any way to optimize the measure? will it be faster if i make it in powerquery following this guide? https://gorilla.bi/power-query/running-total-by-category/
User | Count |
---|---|
98 | |
90 | |
83 | |
70 | |
67 |
User | Count |
---|---|
113 | |
104 | |
101 | |
73 | |
65 |