Forum Discussion
Use slicer value in Dax Measure
- 3 years ago
Hi Saskwyt
I'm afraid then you will need to create some kind of a flag. I will give you a thread similar of what I'm thinking about: https://community.fabric.microsoft.com/t5/Desktop/Date-flag-based-on-slicer-selection-and-Dynamic-measure-values/m-p/1485968#M617448
Hey mlsx4 thanks for the feedback. See below an image of the table I'm trying to achieve - This is what my current Measures are returning. It looks like your suggested solution gives the total up to the date but doesn't show it month by month as shown below:
Hope that makes more sense!
- mlsx43 years ago
Memorable Member
Hi Saskwyt
I'm afraid then you will need to create some kind of a flag. I will give you a thread similar of what I'm thinking about: https://community.fabric.microsoft.com/t5/Desktop/Date-flag-based-on-slicer-selection-and-Dynamic-measure-values/m-p/1485968#M617448
- Saskwyt3 years agoFrequent Visitor
Hey mlsx4 I've managed to apply the information in the link to achieve what I was looking for, I've even managed to get a total column! There is one minor issue....the totals on the table are not correct 😞
The measure I've used for Sales_£ is as follows:
Sales_£ = VAR date1 = SELECTEDVALUE ( 'Table'[EOM] ) VAR date2 = SELECTEDVALUE ( 'Calendar'[EOM] ) RETURN IF ( date2 <= date1, Sum(Tbl_Sales[Sales]), 0 )Hope the above makes sense!!