Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I want to get running total per day and month, most of the measures have filter on date like below:
filter(all('Date'),'Date'[date] <=max('Date'[date])
but when I do that the running total starts from the available data, not what is on the visual.
so I have to add another filter on the date.
this is my measure:
Do I need to create another measure for the monthly view?
Solved! Go to Solution.
I found this below dax somewherelse and it is doing what it should:
I found this below dax somewherelse and it is doing what it should:
Hi,
Follow this process
1. Create a Calendar Table with calculated column formulas for Year, Month name and Month number
2. Sort the Month name column by the Month number
3. Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table
4. To your visual, drag Year, Month name and Date from the Calendar Table
5. Write these measures
Quantity Shipped = SUM('Sales Order Details'[Unit Quantity Shipped])
Quantity shipped YTD = calculate([quantity shipped],datesytd(calendar[date],"31/12"))
Hope this helps.
@Ashish_Mathur , thanks for your reply, I don't want YTD, I just need cummulative of the dates in the visuals.
Hi,
See if this measure works
Quantity shipped YTD = calculate([quantity shipped],datesbetween(calendar[date],minx(allselected(),Calendar[Date]),max(calendar[date])))
there is something wrong with syntax inside minx.
You should use the concept described here by SQLBI:
https://www.sqlbi.com/articles/computing-running-totals-in-dax/
Sales RT :=
VAR MaxDate = MAX ( 'Date'[Date] ) -- Saves the last visible date
RETURN
CALCULATE (
[Sales Amount], -- Computes sales amount
'Date'[Date] <= MaxDate, -- Where date is before the last visible date
ALL ( Date ) -- Removes any other filters from Date
)
I hope this will help you!
@grandtotal , I have tried that, it does not work for daily and monthly.
can you post the definiton of [Quantity Shipped]?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
82 | |
65 | |
63 | |
56 |
User | Count |
---|---|
171 | |
111 | |
110 | |
72 | |
71 |