Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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, @Anonymous
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, @Anonymous
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, @Anonymous
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 |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |