Forum Discussion
Anonymous
7 years agoNot applicable
Generate daily values from date range
Hey guys, I need help with this: I have data that looks like this: Date ID Status 2019.01.15 USER1 NEW 2019.01.30 USER1 REGISTERED 201...
Anonymous
7 years agoNot applicable
With your Calendar Table related to your Fact Table, use the Date column from the Calendar Table on rows and ID from your Fact table on columns. Then use the following measure:
Status =
VAR __LastMonth = EDATE( TODAY(), -1 )
RETURN
IF(
AND(
MAX( DimCalendar[Date]) >= __LastMonth,
HASONEVALUE( Table1[Status]) && HASONEVALUE( DimCalendar[Date])),
VALUES( Table1[Status] ))Will only show statuses and associated ID's that have occured within the last month from the current date:
Final table ( I added another record for april to make sure it was working correctly)