Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
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!
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
hello @Luckylukeman
i assumed you are trying to make measure, so here i created a simple measure example with if statement.
if i copied your DAX, looks like your close parenthesis are misplaced.
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
User | Count |
---|---|
23 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |