Forum Discussion
SWITCH FUNCTION not working for certain visuals for "Total Hours (Previous 30 Days)"
Hey,
I have a SWITCH fucntion that is working for everything but "Total Hours (Previous 30 Days)", I'm presuming this is due to the way I've written the DAX for this measure as opposed to the others, the problem is that when I select the "Total Hours (Previous 30 Days)" option, some of my visuals don't display (The ones that are linked to other tables), If I just load the measure on it's own, then it works, so it's something to do with the way I've written the DAX that is preventing me using other tables fo visualisation.
magnify-bi-com , Try like this
Rolling 30 = CALCULATE([Total Hours],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-30,DAY))
2 Replies
- amitchandak
Super User
magnify-bi-com , Try like this
Rolling 30 = CALCULATE([Total Hours],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-30,DAY))
- magnify-bi-com
Helper I
Thanks Amit, foolishly, I think I just needed to change my MINs to MAXs, that seems to have done the trick.
But your soltuion worked also.
Thanks,
Jon