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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
korrigan
Regular Visitor

Slicer with dynamic current date based on selected country

I need to set up a slicer allowing date selection using either "current Date" label or prior dates, from a calendar table.

On the report, there is another slicer allowing selection of a country.

Upon sleection of a country, the date associated with "current date"may be different: For instance, if the user selects USA, the "current date" should return data for the 2021-03-20. However, if he selects Australia, it should be 2021-03-21.

 

My first idea was to create additional columns in my calendar table, one per country, to get "current date"on the correct record of the calendar table, depending on the timezone. This works fine but I can't switch from one column to another in DAX as column don't support dynamic value based on a slicer.

I have the feeling that I'm not approaching the problem correctly,

 

Thanks

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @korrigan 

 

You may create a table with a utc time difference column for each country. Then you could get the utc time with UTCTODAY or UTCNOW  and get the converted time. Finally you need to create a calculated column in date table like below. Hope it helps.

x =
IF (
    [Date] = [Converted Date],
    "Current Date",
    IF ( [Date] < [Convert Date], "Prior Date" )
)

 

 

Best Regards

Allan

 

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

Anonymous
Not applicable

HI @korrigan 

You need to create proper interactions between your slicers.

Below video will help you achieve it.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors