Forum Discussion
sshiny
Helper II
3 years agoDAX- Date
I am getting data for the last 7th day (Displays 29th Dec data as today is Jan 5th)using the below DAX Last 7 days = TODAY()-7 I need a DAX to get the LAST 7 DAYS data. Please help amitchandak...
- 3 years ago
Hello sshiny,
The measure that you wrote is a scalar value and will give you only one value.
From what I have understood, you need to filter the calendar table using something like this:
FILTER('Calendar', Calendar[Date] >= Today() - 7 && Calendar[Date] <= Today() )
This will give a table of the Last 7 days or you can write a measure something like this
Count = CALCULATE(COUNTROWS('Calendar'), FILTER('Calendar', Calendar[Date] >= Today() - 7 && Calendar[Date] <= Today() ))Hope this helps.
Thank you,
Vishesh Jain
Mahesh0016
Super User
3 years agosshiny
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.