Forum Discussion
Running Total
Hi Anonymous ,
Yes, it is possible. You did not provide much info, but below is an example:
Running Total Measure =
VAR varName = MAX('Table'[Name])
VAR varFruit = MAX('Table'[Fruit])
VAR varCurrentDate = MAX('Table'[Date])
VAR Result =
SUMX(
FILTER(
ALL('Table'),
'Table'[Name] = varName
&& 'Table'[Fruit] = varFruit
&& 'Table'[Date] <= varCurrentDate
),
'Table'[Quantity]
)
RETURN
Result
which will give you this:
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πare nice too.
Nathaniel
Thanks Nathaniel_C where do I set this up in PBI?
The one field I want to count is Ticket_NO, for each day
So, i'd want the table to look like this
| Date | Tickets |
| 29/12 | 100 |
| 30/12 | 110 |
| 31/12 | 110 |
| 01/01 | 120 |
What would the script for that look like?
I'm using a database called UK_DW and a view called V_VM_AMS_TICKET_REPORT_PROD_UK
Thanks for your help.
Rob
- Nathaniel_C3 years agoCommunity Champion
Hi Anonymous ,
You would write it as a measure and drop it on your table as a new column. So can you set up a table with the date and the number of tickets for that day? If so, I can show you how to write the measure for the running total.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πare nice too.
Nathaniel