Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Experts - I have a working cumulative total measure for a date Axis. The total starts at a dynamic period which is determined by the date slicer.
See attached pbix file with sample data for reference here.
Goal is to have X axis display the range of slicer as integers like Day 0,1, 2 and so on from the starting date and calculate the cumulative total for that range, while ignoring the month boundary. So if the slicer date range is April 6 to May 30, the X axis range should be from 0 to 40.
Total Sale =
VAR MAXDATE = LASTDATE(Dates[Date])
VAR MINDATE = FIRSTDATE(Dates[Date])
RETURN
CALCULATE(
SUM('Table'[Sale]),
FILTER
(
ALLSELECTED(Dates),
Dates[Date] <= MAXDATE
// && Dates[Date] >= MINDATE
)
)
The "Total Sale" measure should increase as the range progresses.
The goal is to look at a dynamic trend for total sales based on selected time period selected, so the total should start at the first selected date and continue until last slicer date
Any help would be appreciated.
Thanks
Andy
Solved! Go to Solution.
@andy_pat , I checked it your file working correctly. You are using Day, which is across the month. Plot it on the date and check
or try like
Total Sale =
CALCULATE(
SUM('Table'[Sale]),
FILTER
(
ALLSELECTED(Dates),
day(Dates[Date]) <= day(max(Dates[Date]))
)
)
@andy_pat , Try like
Total Sale =
CALCULATE(
SUM('Table'[Sale]),
FILTER
(
ALLSELECTED(Dates),
Dates[Date] <= max(Dates[Date])
)
)
Thanks! I tried it, but it doesn't work. I get the same issue.
@andy_pat , I checked it your file working correctly. You are using Day, which is across the month. Plot it on the date and check
or try like
Total Sale =
CALCULATE(
SUM('Table'[Sale]),
FILTER
(
ALLSELECTED(Dates),
day(Dates[Date]) <= day(max(Dates[Date]))
)
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |