Forum Discussion
Chandrashekar
4 years agoResolver III
Addcolumns with Condtions
Hello Team, am new to Power Bi. Can you guide how to addcolumns when condition met(Example below) In below example if day is Thursday then I need to addcolumns. date period = var todayday...
- 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!
Chandrashekar
4 years agoResolver III
Hello Team,
Thanks for the solution.
Regards,
Chandrashekar B
Chandrashekar
4 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")
)
)