Forum Discussion
Conditional measure with Date hierarchy
I have a date hierarchy with Week Number, Day. I have this on x-axis of a line chart with a measure on Y-axis. By default the line chart sums the measure when I drill up to a week level but I don't want the measure to be summed but rather I want the value of the first monday of each week to be calculated when I drill up at week level.
Does anyone know how to calculate this?
2 Replies
- amitchandak
Super User
rishtinz , use isfiltered or is isinscope to check that.
Also use filter like weekday([Date],2) =1, In measure
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
- rishtinz
Helper II
Hi Amit, thank you for helping me out on this. The weekday filter you suggested is working out. However, the isinscope seems to be calculating WEEKLY variable and not DAILY when I have expanded down to daily. It only works when I drill down each level at a time.