cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

 

 

 

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 Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)