Forum Discussion
nbufff
Helper I
1 year agoShow previous date data on matrix table
Dear Community, I stuck on issue how to show previous date data on matrix table. I made matrix table showing qty each day from plant A and B. I want to make it as showing in second picture wi...
- 1 year ago
Hi nbufff ,
You can produce your required output by writing a dax measure like below:
Date_Diff = VAR StartDate = DATE(2024, 11, 1) -- Starting point VAR CurrentDate = SELECTEDVALUE(Calendar[Date]) RETURN IF( CurrentDate >= StartDate, CALCULATE( COUNTROWS('Calendar'), FILTER( ALL('Calendar'), Calendar[Date] >= StartDate && Calendar[Date] <= CurrentDate && Calendar[IsWorkingDay] = 1 ) ), BLANK() -- If the date is before November 1, return blank )The resulting output is shown below. I've transposed the visualization to save space.
I have attached an example pbix file for your reference.
Best regards,
johnt75
Super User
1 year agoTry
Including Missing Dates =
COALESCE (
[Base Measure],
VAR MaxDate =
MAX ( 'Date'[Date] )
VAR Result =
LASTNONBLANKVALUE (
FILTER ( ALL ( 'Date'[Date] ), 'Date'[Date] < MaxDate ),
[Base Measure]
)
RETURN
Result
)