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
Luckylukeman
New Member

how to use if 3 criteria in power bi

Hi 

I need your help to configure the formula 

 

if balance <= 150000 ; balance *rate * portion 

if balance <=250000; (150000*rate*portion)+((balance-150000)*rate*portion)

if balance >250000; ((150000*rate*portion)+((250000-150000)*rate*portion)+(balance-250000)*rate*portion)

 

for example balance is 350000 it will be got 3rd calculated 

for 1st leg interest = 150000*rate * portion 

for 2nd leg interest = (150000*rate*portion) +((250000-150000)*rate*portion)

for 3rd leg interest= balance - 250000 *rate * portion 

 

i have try 

IF(SELECTEDVALUE('Total Saldo Perhari'[Saldo]<=150000000000000,SELECTEDVALUE('Total Saldo Perhari'[Saldo]*0.95*0.06, IF(SELECTEDVALUE('Total Saldo Perhari'[Saldo]<=250000000000000,(150000000000000*0.95*0.06)+SELECTEDVALUE('Total Saldo Perhari'[Saldo]-150000000000000)*0.85*0.06, IF(SELECTEDVALUE('Total Saldo Perhari'[Saldo]>250000000000000,((150000000000000*0.95*0.06)+(250000000000000-150000000000000)*0.85*0.06+((SELECTEDVALUE('Total Saldo Perhari'[Saldo]-250000000000000)*0.8467*0.06)),0))))))))
 
but error Operator or expression '( )' is not supported in this context.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Luckylukeman.,

Thanks for the reply from Irwan.

 

Please modify your DAX as below:

 

Measure = 
VAR Balance =MAX('Table (2)'[SaldoTest])

RETURN 
IF (
    Balance <= 150000,
    Balance * 0.95*0.06, 
    IF (
        Balance <= 250000,
        (150000 * 0.95*0.06) + ((Balance - 150000) * 0.85*0.06),
        (150000 * 0.95*0.06) + 
        ((250000 - 150000) * 0.85*0.06) + 
        ((Balance - 250000) *0.8467*0.06)
    )
)
​

 

The pbix file is attached, please check for details.

 

If you have any other question please feel free to contact me.

 

Best Regards,
Qi
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Luckylukeman.,

Thanks for the reply from Irwan.

 

Please modify your DAX as below:

 

Measure = 
VAR Balance =MAX('Table (2)'[SaldoTest])

RETURN 
IF (
    Balance <= 150000,
    Balance * 0.95*0.06, 
    IF (
        Balance <= 250000,
        (150000 * 0.95*0.06) + ((Balance - 150000) * 0.85*0.06),
        (150000 * 0.95*0.06) + 
        ((250000 - 150000) * 0.85*0.06) + 
        ((Balance - 250000) *0.8467*0.06)
    )
)
​

 

The pbix file is attached, please check for details.

 

If you have any other question please feel free to contact me.

 

Best Regards,
Qi
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

it works ,,thanks for assistance

Irwan
Super User
Super User

hello @Luckylukeman 

 

i assumed you are trying to make measure, so here i created a simple measure example with if statement.

Irwan_2-1735620875260.png

 

if i copied your DAX, looks like your close parenthesis are misplaced.

Irwan_1-1735620696793.png

you want to put close parenthesis after a column like this SELECTEDVALUE('column'), not at the end of DAX.

 

Hope this will help.
Thank you.

thanks for your advice

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.