Forum Discussion
Help with customizing a weekly chart using a Date Dimension
- Anonymous4 years ago
Hi,
Thank you for the suggestion. I ended up solving this issue by creating a long Switch statement like seen on this stackoverflow post: https://stackoverflow.com/questions/40254578/multiple-if-statements-in-dax
However, I am open to accepting a more efficient solution. Here is how the first few lines of my switch statement look:
new_weeks = SWITCH(TRUE(),AND('Date Dimension (4)'[Date]>DATE(2021,1,31), 'Date Dimension (4)'[Date]<DATE(2021,2,6)), 1,AND('Date Dimension (4)'[Date]>DATE(2021,2,5), 'Date Dimension (4)'[Date]<DATE(2021,2,13)), 2,
Hi,
Thank you for the suggestion. I ended up solving this issue by creating a long Switch statement like seen on this stackoverflow post: https://stackoverflow.com/questions/40254578/multiple-if-statements-in-dax
However, I am open to accepting a more efficient solution. Here is how the first few lines of my switch statement look:
- Anonymous4 years agoNot applicable
Hi Anonymous ,
Glad you can solve the issue.
Please mark your reply as an answer, and more people will benefit.
Best Regards,
Stephen Tao