Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Can any one help with dax for filter date and car number should get running total of the person from stating
example table
Name | Car | Amount | Type of debit | Date | Net | Debit | Credit | Balance |
XYZ | XX car | 1000 | Amount debit | 21-03-2024 00:05 | 1000 | 1000 | 0 | 1,000.00 |
XYZ | XX car | 1000 | Amount debit | 21-03-2024 00:05 | 1000 | 1000 | 0 | 2,000.00 |
XYZ | XX car | 160 | Amount debit | 21-03-2024 00:05 | 160 | 160 | 0 | 2,160.00 |
XYZ | XX car | 172.36 | Amount debit | 21-03-2024 00:05 | 172.36 | 172.36 | 0 | 2,332.36 |
XYZ | XX car | 125 | Amount debit | 21-03-2024 00:05 | 125 | 125 | 0 | 2,457.36 |
XYZ | XX car | 12.76 | Amount debit | 21-03-2024 00:05 | 12.76 | 12.76 | 0 | 2,470.12 |
XYZ | XX car | 1608.74 | OnlinePayment | 21-03-2024 00:05 | -1608.7 | 0 | 1608.74 | 861.38 |
Solved! Go to Solution.
Hi, @Vishal_Kumar_R
try below code for measure
running total = CALCULATE(SUM('Table (4)'[Balance]),
FILTER(
ALLSELECTED('Table (4)'),
'Table (4)'[Date]<=MAX('Table (4)'[Date])))
All date are same that the reason total balance are same in all row
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Vishal_Kumar_R
try below code for measure
running total = CALCULATE(SUM('Table (4)'[Balance]),
FILTER(
ALLSELECTED('Table (4)'),
'Table (4)'[Date]<=MAX('Table (4)'[Date])))
All date are same that the reason total balance are same in all row
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Thank you for reply,
actually there is not balance colume i required a balance colume as a running total so that if it filter a car number automatically it should the balnce from start date to end date as shown in the example but your query will show the same for all the days
Hi, @Vishal_Kumar_R
try below code for new column
Column =
SUMX(
FILTER(
ALL('Table (2)'),
'Table (2)'[Name]=EARLIER('Table (2)'[Name]) &&
'Table (2)'[Car ]=EARLIER('Table (2)'[Car ]) &&
'Table (2)'[Date]<=EARLIER('Table (2)'[Date])
),
'Table (2)'[Balance]
)
just adjust table name and column name
User | Count |
---|---|
53 | |
35 | |
20 | |
16 | |
15 |
User | Count |
---|---|
94 | |
76 | |
36 | |
22 | |
18 |