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

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.

Reply
justnoob08
Frequent Visitor

Is it possible to do different calculation on a measure depending on Month

Hello Guys, I have been struggling on how I can do this. 

Below is what I'm trying to achieve to display on a matrix Visual. 

 

WeightScore = [Score] * 0.05 (For Jan - March)

WeightScore = [Score] * 0.03 (For April- June)

 

So basically, the percentage changes depending on the quarter but It needs to be displayed on a single measure. I tried using If, but unable to achieve this.

 

Thank you for the help!

 

 ScoreWeight Score
January50.25
February50.25
March50.25
April50.15
May50.15
June50.15
July50.4
August50.4
September50.4
October50.5
November50.5
December50.5
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you! this is really helpful!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@justnoob08 , Create a new measure like

[Score] * Switch(True(),
[month] in {"January","February","March"}, 0.05,
[month] in {"April","May","June"}, 0.05,
// Add other
)

Hi, amitchandak. Thank you for the response, I have a problem I can't seem to use month because it is a column on my calendar table. I'm I doing something wrong here?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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