Forum Discussion
Addcolumns with Condtions
- 4 years ago
I see, in cases like these you can create a filter measure and use that to filter your slicer.
Example:Last 3 days slicer = IF(max('Calendar example'[Date])>=TODAY()-3 && max('Calendar example'[Date])<=TODAY(),1,0)
End result in slicer:
I hope this helps to solve your issue and if it does consider accepting this as a solution and gicing the post a thumbs up!
Hello Team,
am trying to get result in below format.
Regards,
Chandrashekar B
Hi,
You can change the slicer in my example to a list and then make its alignment horizontal:
Also to exclude today from the slicer you can modify the dax a bit:
Last 3 days slicer = IF(max('Calendar example'[Date])>TODAY()-3 && max('Calendar example'[Date])<=TODAY(),1,0)
- Chandrashekar4 years agoResolver III
Hello Team,
Thanks for the solution.
Regards,
Chandrashekar B
- Chandrashekar4 years agoResolver III
Hello Team,
Can you please advise if still I can use if condition to acheive task.
My intention to explore more. Example below:
date period =
todayday=format(today(),"ddd"="Mon"
if(todayday,
ADDCOLUMNS(
DATESINPERIOD('date'[Date_rec],TODAY()-3,1,DAY),
"type",format(DATESINPERIOD('date'[Date_rec],TODAY()-3,1,DAY),"dd-mmm")
)
)