Forum Discussion
steadydriver
3 years agoFrequent Visitor
Dax to Build a Dynamic Table which Changes on Slicer - Which Groups By and Max Value Based on Slicer
Hi I want to build a Dynamic Table in Dax, which changes each time the slicer date changes, it needs to -Return 1 Record Per Student ID -Only Include Students where there start date is between ...
- 2 years ago
Please see file attach.
File attach is not available for all the users but you can use a onedrive, google drive, we transfer or similar link to upload your files.
MFelix
Super User
2 years agoHi steadydriver ,
You need to create a calendar table, then add the following measure:
User Within dates =
IF (
SELECTEDVALUE ( StudentsStatus[status_star_date] )
= MAXX (
SUMMARIZE (
FILTER (
ALLSELECTED ( StudentsStatus ),
StudentsStatus[Student_ID]
IN VALUES ( StudentsStatus[Student_ID] )
&& StudentsStatus[status_star_date] <= MAX ( 'Calendar'[Date] )
),
StudentsStatus[Student_ID],
"date", MAX ( StudentsStatus[status_star_date] )
),
[DATE]
),
1
)
Now you can use this as a filter on your table visualization:
In this case I'm using it in the visual itself but it does not need to be there:
steadydriver
2 years agoFrequent Visitor
Hi for some reason I don't seem to have the option to upload by pbix, are you able to upload your example? Thanks
- MFelix2 years ago
Super User
Please see file attach.
File attach is not available for all the users but you can use a onedrive, google drive, we transfer or similar link to upload your files.