Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I can't find a way to calculate a running total, without using FILTER. Filter is not supported in PowerBi direct query-mode.
All help is appreciated
Not supported in Direct Query Mode 😞
Running Total in DAX = CALCULATE( SUM('Table'[QTY]),
FILTER(
ALLSelected('Table'),
'Table'[Date] <= MAX('Table'[Date])
)
)
Solved! Go to Solution.
Hi @Rajiv1237,
Did you turn on the "allow unrestricted measures in directquery mode" option? If not you can turn on it first.
In addition, my formual is a measure, don't put it in calculate column.
Regards.
Xiaoxin Sheng
RunningTotalinPowerBI = SUMX(FILTER(ALLSELECTED(YearQty), YearQty[DateKey]<=MAX(YearQty[DateKey])), YearQty[Qty]) |
Filter works in Direct Query Mode: We have to check the option in Power BI desktop ‘Allow unrestricted measures in DirectQuery mode’
File -> Option and settings -> Option
Hi @Rajiv1237,
You can use power query to calculate the running total at query editor side.
For detailed information you can take a look at below blog:
Create Running Totals in Power Query
Regards,
Xiaoxin Sheng
We can't apply this in Power BI.
We should find some simple solution to get running total in Power BI direct query mode.
Hi @Rajiv1237,
I test with below measure at direct query mode, it works smooth, perhaps you can try it.
Running Total = SUMX(FILTER(ALL(Table),Table[Date]<=MAX(Table[Date])),[QTY])
Regarsd,
Xiaoxin Sheng
Its DirectQuery Mode not Loading the data into PowerBI.
Filter function doesn't work in PowerBI Direct Query Mode
Hi @Rajiv1237,
Did you turn on the "allow unrestricted measures in directquery mode" option? If not you can turn on it first.
In addition, my formual is a measure, don't put it in calculate column.
Regards.
Xiaoxin Sheng
RunningTotalinPowerBI = SUMX(FILTER(ALLSELECTED(YearQty), YearQty[DateKey]<=MAX(YearQty[DateKey])), YearQty[Qty]) |
Filter works in Direct Query Mode: We have to check the option in Power BI desktop ‘Allow unrestricted measures in DirectQuery mode’
File -> Option and settings -> Option
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
69 | |
48 | |
41 | |
34 |
User | Count |
---|---|
164 | |
112 | |
62 | |
54 | |
38 |