Forum Discussion
Anonymous
2 years agoNot applicable
Measure dealing with date
Hi, I am currently working on a dashboard and was wondering if someone could help with a fomula. So a brief explanation of what I want to do is have a slicer where I can select a week on the cale...
Jihwan_Kim
Super User
2 years agoHi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
WINDOW function (DAX) - DAX | Microsoft Learn
expected result measure: =
VAR _t =
WINDOW (
-3,
REL,
-1,
REL,
ALL ( 'calendar slicer'[Year-Week] ),
ORDERBY ( 'calendar slicer'[Year-Week], ASC )
)
RETURN
CALCULATE (
SUM ( sales[sales] ),
'calendar'[Year-Week] IN _t
)
- Anonymous2 years agoNot applicable
Hi,
So I actually have dates already predeterminded ina column, does this change the way I approach this?
Here is an image of my columns
Thanks
- Jihwan_Kim2 years ago
Super User
Hi,
Please share your sample pbix file's link and how the expected outcome looks like in the visualization, and then I can try to look into it.
Thank you.