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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Dimitris_Kats
Helper V
Helper V

Calculations based on month

Hello dear members,

 

In my model I have created an independed table with percentages from 1%-100% and I have  this formula :

IF(DISTINCTCOUNT(Percentage[Value])>1, CALCULATE(SUM(Table1[Salary]) ), IFERROR( CALCULATE(SUM(Table1[Salary])*(1+MAX(Percentage[Value])),BLANK()))

 

I calculate the salary based on the percentage selection from the slicer.

 

So I have a report like this:

 

                        January     February       March      April     May    June   July     August   September   October   November   December

IT DIVISION      10000         10000         10000     10000  10000  10000 10000   10000    10000           10000       10000         10000  

 

If the user chooses, for example 5% all these amounts will be increase by 5%
I want this calculationto be applied only to specific months ( April - December) . January to March i want to show only this SUM(Table1[Salary])

 

How can i do this?

Thank you in advance

1 ACCEPTED SOLUTION
Kishore_Kadhir
Resolver II
Resolver II

Hi @Dimitris_Kats 

 

You can create a measure with Switch statement:

SWITCH(
TRUE(),
MAX('Table'[Month]) IN {"Jan", "Feb", "Mar"}, SUM(SALARY),
MAX('Table'[Month]) IN {"Apr", ----- , "Dec"}, SUM(SALARY) + ([Selected Percentage] * SUM(Salary))
)
Hope this helps.
Regards,
Kishore

View solution in original post

2 REPLIES 2
Kishore_Kadhir
Resolver II
Resolver II

Hi @Dimitris_Kats 

 

You can create a measure with Switch statement:

SWITCH(
TRUE(),
MAX('Table'[Month]) IN {"Jan", "Feb", "Mar"}, SUM(SALARY),
MAX('Table'[Month]) IN {"Apr", ----- , "Dec"}, SUM(SALARY) + ([Selected Percentage] * SUM(Salary))
)
Hope this helps.
Regards,
Kishore

Thank you so much @Kishore_Kadhir  that works perfectly! 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.