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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
ShuchiSharma
Frequent Visitor

How to hide the future dates from the slicer conn

 

I have used a date table to connect the data from 2 different files and its working fine. However, when I publish and share the dashboard with other stakeholders, it's gets confusing from them till what date its showing the values. How can I hide the future dates from the slicer?

 

ShuchiSharma_1-1652335372001.png

 

On the other hand, if there is only 1 excel file and no date table, there is no such problem. 

Please guide!

Thanks

 

 

 

1 ACCEPTED SOLUTION

Hi @ShuchiSharma ,

Firstly, in your below formula, the position of the closing parenthesis of the MAX function is wrong, it should be 

D=CALENDAR(MAX('Date'[Date]),today())

vkalyjmsft_0-1652857409220.png

 

In your new Date table formula, you don't need to calculate the min and max year because the calendarauto function is calculated automatically based on data in the model. Modify it like this.

Date =
ADDCOLUMNS (
    FILTER ( CALENDARAUTO (), [Date] <= TODAY () ),
    "Calendar Year", "CY " & YEAR ( [Date] ),
    "Month Name", FORMAT ( [Date], "mmmm" ),
    "Month Number", MONTH ( [Date] )
)

This table will get your expected date period.

 

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

7 REPLIES 7
ShuchiSharma
Frequent Visitor

Hi guys,

Still need help! Can anyone please help here with the above query? 

Thanks

ShuchiSharma
Frequent Visitor

Hi Shishir,

Thanks for the reply. I have tried but seems like doing it somewhere wrong. Can you please have a look?

ShuchiSharma_0-1652395665277.png

Using the below, I created the date table:

Date =
VAR MinYear = YEAR ( MIN ( 'Raised Data'[AddDateTime] ) )
VAR MaxYear = YEAR ( MAX ( 'Raised Data'[AddDateTime] ) )
RETURN
ADDCOLUMNS (
FILTER (
CALENDARAUTO( ),
AND ( YEAR ( [Date] ) >= MinYear, YEAR ( [Date] ) <= MaxYear )
),
"Calendar Year", "CY " & YEAR ( [Date] ),
"Month Name", FORMAT ( [Date], "mmmm" ),
"Month Number", MONTH ( [Date] )
)

And there are only three tables:

ShuchiSharma_1-1652395815975.png

Thanks 

 

Hi @ShuchiSharma ,

Firstly, in your below formula, the position of the closing parenthesis of the MAX function is wrong, it should be 

D=CALENDAR(MAX('Date'[Date]),today())

vkalyjmsft_0-1652857409220.png

 

In your new Date table formula, you don't need to calculate the min and max year because the calendarauto function is calculated automatically based on data in the model. Modify it like this.

Date =
ADDCOLUMNS (
    FILTER ( CALENDARAUTO (), [Date] <= TODAY () ),
    "Calendar Year", "CY " & YEAR ( [Date] ),
    "Month Name", FORMAT ( [Date], "mmmm" ),
    "Month Number", MONTH ( [Date] )
)

This table will get your expected date period.

 

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

Hi @v-yanjiang-msft Thank you so much. You saved me! Thanks again!

jaipal
Resolver III
Resolver III

@ShuchiSharma you can hide future dates by doing this 

jaipal_0-1652336800795.png

 

Thanks for the suggestion jaipal. However, this doesn't include the past dates. I need all the dates till today to compare the results. 

Shishir22
Solution Sage
Solution Sage

Hello @ShuchiSharma,

 

If you dont need to see future dates data, I would suggest remove it from your date dimension and your fact tables.

 

You can use Calendar(Max(date column from your fact table), today()) to get table with dates only till today

or

You can add a flag(Calculated column) in your date dimension and use it as a report/visual level filter.

Flag=if(DimDate[Date] <= Today(),1,Blank())

apply Flag=1 as a report/visual level filter.

 

Please mark it as answer if it solves your issue. Kudos are also appreciated..

 

 

Cheers,
Shishir

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.