cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
regasanyoto Member
Member

Re: If else then statement on a date slicer

Hi @gooranga1,

 

Thanks for this solution, you have solved my problem.

 

Next requirement is when this table is shown , my client would like to interact with a slicer that contain, the date of today, date of yesterday  and other day? See the image below.

 

 

2018-01-19 15_35_45-Power BI – Did you know ALL Power BI Services Servers are in UTC_ Now how to han.png

 

 

 

Highlighted
gooranga1 Senior Member
Senior Member

Re: If else then statement on a date slicer

You just need a function to calculate it based on your date. My date field is called sql_date just replace your date.

 

Selector = if(Query1[sql_date]=date(year(now()),month(now()),day(now())),"Today",if(Query1[sql_date]=date(year(today()-1),month(today()-1),day(today()-1)),"Yesterday","Other"))

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (4,541)