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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
eliasayyy
Memorable Member
Memorable Member

fill tax rate on calendar in dax

i have tax rate that changes over time

Date                                                 Tax Rate

Wednesday, January 1, 2020        0.15
Wednesday, August 19, 20200.25
Monday, February 1, 20210.275
Tuesday, April 12, 20220.3
Monday, September 26, 20220.3225
Tuesday, May 2, 20230.35


i have calendar table from jan 1 2020 to july 11 2023

how can i make my calcultion that if its february 20 2020 for example, the rate must be 0.15 and another exmple on june 5 2023 the rate is 0.35

NOTE: I know how to do it in power query i was just wondering if there is a wawy on dax without filling dates on my tax table

1 ACCEPTED SOLUTION
barritown
Super User
Super User

Hi @eliasayyy,

You could try this [DAX] measure:

barritown_0-1689598295279.png

In plain text:

Current Rate = 
VAR CurrentDate = MAX ( 'Date'[Date] )
VAR ChosenRateDate = MAXX ( FILTER (  ALL ( Rates ), [Date] <= CurrentDate ), [Date] )
RETURN LOOKUPVALUE ( Rates[Tax Rate], Rates[Date], ChosenRateDate )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

View solution in original post

1 REPLY 1
barritown
Super User
Super User

Hi @eliasayyy,

You could try this [DAX] measure:

barritown_0-1689598295279.png

In plain text:

Current Rate = 
VAR CurrentDate = MAX ( 'Date'[Date] )
VAR ChosenRateDate = MAXX ( FILTER (  ALL ( Rates ), [Date] <= CurrentDate ), [Date] )
RETURN LOOKUPVALUE ( Rates[Tax Rate], Rates[Date], ChosenRateDate )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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