Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Solved! Go to Solution.
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"
)
you can either create measure to multiple by x or y OR directly use the formula inside switch.
Hope this helps!
Thanks,
AnthonyJospeh
Does my date column need to be in a certain format? Its not recognizing the date and is categorizing everything as the same.
Hi @Bryanna , I think your column is in "Date/time" datatype format. Please can you change to "Date" datatype and try the measure.
Thanks,
AnthonyJoseph
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"
)
you can either create measure to multiple by x or y OR directly use the formula inside switch.
Hope this helps!
Thanks,
AnthonyJospeh
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
32 | |
30 | |
18 | |
18 |