Running Total in Power BI for non date Values | How to calculate running total in Power BI using DAX

Опубликовано: 10 Март 2025
на канале: PowerBI Zone
5,135
75

#dax #powerbi_training #powerbidax
We learn how to calculate running total in Power BI for non date values using DAX.In the earlier video we found out the process to create a running total for date values.So we have two options for the running total :
1.Option 1: Using sort on country column.Here we apply the below logic in DAX and create a measure as shown :
RT for Country =
CALCULATE([Sum_Sales],
FILTER(ALL(DimGeography[EnglishCountryRegionName]),
DimGeography[EnglishCountryRegionName]less than =max(DimGeography[EnglishCountryRegionName])
))

2.option 2: Using sort on total sales as shown below .To create the running total we use the below DAX measure:
RT for Sales_Amount =
var current_Rank=RANKX(ALL(DimGeography[EnglishCountryRegionName]),
[Sum_Sales],,DESC,Dense)


var Result=CALCULATE([Sum_Sales],
FILTER(ALL(DimGeography[EnglishCountryRegionName]),
RANKX(ALL(DimGeography[EnglishCountryRegionName]),
[Sum_Sales],,DESC,Dense) less than=current_Rank)
)
return Result

This is a really useful feature and one that you should definitely learn how to use!

Check out other Power BI Tutorials Videos :
1.SamePeriodLastYear with Example:    • difference between parallelperiod and...  
2.How to Calculate Running Totals:    • How to calculate running total in pow...  
3.Duplicate Vs Reference :    • power bi difference between duplicate...  
4.Merge Vs Append:    • power bi difference between merge and...  
5.Calculate Function in DAX Power BI:    • What is Calculate Function in Power B...  
6.Filter Function in Power BI:    • Filter Function in Power BI DAX  
7.Row Vs Filter Context:    • Row Context Vs Filter Context in Powe...  
8.ALL DAX Function:    • How to use ALL Dax Function in Power ...  
9.ALL Vs ALLSELECTED :    • allselected dax|all vs allselected da...  
10.ALL Vs ALLSELECTED VS ALLEXCEPT :    • All Vs AllSelected Vs AllExcept | Pow...  
11.ALL Vs REMOVEFILTERS :    • ALL Vs REMOVEFILTERS Difference in Po...  
12.TOPN Dax Usage :    • TOPN Dax | How to use topn dax in pow...  
13.Summarize Dax Function in Power BI:    • summarize dax | How to use summarize ...  
14.Summarize Vs Summarizecolumn :   • summarize vs summarizecolumns | how t...  
15.Calendar Vs CalendarAuto :    • Calendar Vs Calendar Auto Dax Functio...  
16.How to create a date table in Power BI :    • how to create a date table in power b...  
17.How to calculate Running total for date values in Power BI
   • How to calculate Running total for da...  

Learn Power BI through our vlog and Free Videos:
https://powerbizone.com/category/arti...

You can download the pbix file for your self practice sessions from :
https://drive.google.com/file/d/1AeNZ...
Do not forget to Like ,Subscribe and comment which keeps me motivated !