Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ajeck
Helper II
Helper II

automatic slicer date power bi

Dear Power BI community,

I would like to make my date slicer going automatic from date 1 till today. 

I have add a new colloum in date calender (invoked Function table) and i name it filtermonth where 

Filtermonth = IF('Invoked Function'[DayOfMonth]<DAY(TODAY()),1,0).
Then i give filtermonth as a filter to the date slicer, but it doesn't work.
The date in data slicer still between 1 to 31
 
 
Thank you so much
 
Rgds
Aji
1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Ajeck ,

 

I just changed the calculated column to measure, and that took effect.
But measure can only be used in visual level filter.

Measure = IF(MAX('Invoked Function'[Date].[Day])<DAY(TODAY()),1)

test_automatic slicer date power bi.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @Ajeck ,

 

I just changed the calculated column to measure, and that took effect.
But measure can only be used in visual level filter.

Measure = IF(MAX('Invoked Function'[Date].[Day])<DAY(TODAY()),1)

test_automatic slicer date power bi.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear Mr. /Mrs. Liang

 

accordint to your suggestion i have a new problem, it's work on the day slicer of date but for sale amount value it doesn't work. 

 

Ajeck_0-1600698258810.png

the date-day Slicer is set from 1 st day till today (it's work)

But if i calculate MTD last month, the value isn,t 300, but it's must be 50,

it has the same problem in YTD last Year, the value must be 600 not 800,

 

How can i fix this problem, here is the PBIX file

 https://ptaab-my.sharepoint.com/:u:/g/personal/akristyonoputro_asuransiastra_com/EWHoB2z46zhLhzKPh6a... 

 

 

 

Thanks at all,,

 

Rgds

Ajeck

@V-lianl-msft ,

 

Thank you very much, it works

amitchandak
Super User
Super User

@Ajeck , not very clear.

You can control your calendar from Min date of the table till today

 

date = calendar(Min(Table[Date]), Today())

 

I doubt you use any function to initialize the slicer.

 

Can you explain with an example.

 

Dear @amitchandak ,

 

Sory for my unclear statement,

 

I would like to make my a visual date slicer going automatic from date 1 till today. 

and for an example i'm attaching pbix file : 

 

https://ptaab-my.sharepoint.com/:u:/g/personal/akristyonoputro_asuransiastra_com/Edc1uHI9v9dBgxvYtds... 

 

and 

https://ptaab-my.sharepoint.com/:i:/g/personal/akristyonoputro_asuransiastra_com/EY88BgzB6MRLjBLt00F...   

 

Thankyou for Helping me

 

Rgds

Ajeck

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.