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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Bryanna
Helper II
Helper II

How to calculate a Rate for certain time period

How can i calculate in PBI if my date is between 10/1/2021 and 9/30/2022 that it multiplies by 'x rate'.  If the date is between 10/1/2022 and 9/30/2023 that it multiples by 'y date'.

 

Basically my rate changes every year and want to be able to see the old rate during the correct time period and the new year during the new time period.

1 ACCEPTED SOLUTION
AnthonyJoseph
Resolver III
Resolver III

Hi @Bryanna 

 

I would use switch function. Below how the sample measure will look like

switch = 
SWITCH(TRUE(),
min('Table'[Date])<=date(2022,09,30), "x multiples measure",
Min('Table'[Date])<=date(2023,09,30), "y multiples measure"
)

 

AnthonyJoseph_0-1662576834880.png

you can either create measure to multiple by x or y OR directly use the formula inside switch.

 

Hope this helps!

 

Thanks,

AnthonyJospeh

View solution in original post

3 REPLIES 3
Bryanna
Helper II
Helper II

Does my date column need to be in a certain format? Its not recognizing the date and is categorizing everything as the same.

 

Bryanna_0-1662583524585.png

 

Hi @Bryanna , I think your column is in "Date/time" datatype format. Please can you change to "Date" datatype and try the measure.

 

AnthonyJoseph_0-1662699810281.png

 

Thanks,

AnthonyJoseph

AnthonyJoseph
Resolver III
Resolver III

Hi @Bryanna 

 

I would use switch function. Below how the sample measure will look like

switch = 
SWITCH(TRUE(),
min('Table'[Date])<=date(2022,09,30), "x multiples measure",
Min('Table'[Date])<=date(2023,09,30), "y multiples measure"
)

 

AnthonyJoseph_0-1662576834880.png

you can either create measure to multiple by x or y OR directly use the formula inside switch.

 

Hope this helps!

 

Thanks,

AnthonyJospeh

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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