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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Kellef
Helper I
Helper I

Dynamic dateslicer with all days marked until today

Hello,

I have created a hierarchy of year, month and day.

I'm trying to get the date slicer set as the latest date dynamically today()).

But I'm also trying to make the date slicer select all days up to today, today(). Is this possible? I want to look at all the data up to today, and not per day. So that all days are checked in until today.

 

What i have created so far: 

Latest period = date(year(TODAY () ),MONTH ( TODAY ()),day(TODAY ())) (a column created in the Datedimension, and 
Period = IF (
 
        YEAR ( 'DimDate'[Date] ) = YEAR ('DimDate'[Latest period] )
 
        && MONTH ('DimDate'[Date]) = MONTH ( 'DimDate'[Latest period] ),'DimDate'[month],'DimDate'[month])
i use this in my dateslicer to enter the report on the latest year and month at the moment (and will put in day as soon i get an a good tip for this problem 🙂 ).

/Patrik


6 REPLIES 6
Kellef
Helper I
Helper I

Thank you, this is already what i have done, second part is that i want. example: today is 2024-03-13 , i want 2024 to be checked, the month to checked and all days until the 13 th to checked. is that possible?

Hi @Kellef 

You just need to change the measure to the following.

Measure = IF(YEAR(MAX('Table'[Date]))=YEAR(TODAY())&&MAX('Table'[Date])<=TODAY(),1,0)

Output

vxinruzhumsft_0-1710834094250.png

 

Best Regards!

Yolo Zhu

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

 

Kellef_0-1710921607991.png

I want the dateslicer to look like this, ackumulated until today.
i tried youre way, but maby im missing something? 

best regards,
Patrik

Hi @Kellef 

If you want to achieve this, you can consider to use custom visual:pre-selected visual.

vxinruzhumsft_0-1710922362484.png

2.Create a table.

vxinruzhumsft_1-1710922426013.png

Then change the measure 

Measure = IF(YEAR(MAX('Table'[Date]))=YEAR(TODAY())&&MAX('Table'[Date])<=TODAY(),TRUE(),FALSE())

Then put the following fields to the visual.

vxinruzhumsft_2-1710922486290.png

 

Output

vxinruzhumsft_3-1710922498776.png

 

Note:It has limitation that it cannot put the hierarchy to the field.

 

Best Regards!

Yolo Zhu

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

 

the dates was marked until today, so in that case it worked. But unfortunality it didnt look so good and my sameperiodlastyear measures didnt calculate correctly with that type of slicer. 

But a good tip!
Thanks.

v-xinruzhu-msft
Community Support
Community Support

Hi @Kellef 

You can refer to the following example.

Sample data 

vxinruzhumsft_0-1710298539893.png

1.Create a measure

Measure = IF(EOMONTH(MAX('Table'[Date]),0)=EOMONTH(TODAY(),0),1,0)

2.Put the date hierarchy to the slicer,and put the meaure to the slicer visual filter.

vxinruzhumsft_2-1710298664621.png

 

vxinruzhumsft_3-1710298670213.png

 

Output

vxinruzhumsft_4-1710298680226.png

 

Best Regards!

Yolo Zhu

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.