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.
if [BUSINESS TYPE] <> "New Product" or [BUSINESS TYPE] <> "Distributed Capacity" then 0 else
if [BUSINESS TYPE] = "New Product" or [BUSINESS TYPE] = "Distributed Capacity" then
if [NO OF MONTHS] < 24 then 0 else
if [NO OF MONTHS] >= 24 and [NO OF MONTHS] <= 36 then
(( [NO OF MONTHS] - 12) / 12) * (.50 * [Tier 1 Rate]) * [FINAL COMMISSIONABLE VALUE USD] else
if [NO OF MONTHS] >= 36 then
((36 - 12) / 12) * (.50 * [Tier 1 Rate]) * [FINAL COMMISSIONABLE VALUE USD] else
0
Solved! Go to Solution.
Hi @Mjwhite1,
Based on my assumption, you may want a if condition like below:
if [BUSINESS TYPE]<>"New Product" and [BUSINESS TYPE]<> "Distributed Capacity"
then 0
else if [NO OF MONTHS]<24
then 0
else if [NO OF MONTHS]>=24 and [NO OF MONTHS]<=36
then (( [NO OF MONTHS] - 12) / 12) * (.50 * [Tier 1 Rate]) * [FINAL COMMISSIONABLE VALUE USD]
else ((36 - 12) / 12) * (.50 * [Tier 1 Rate]) * [FINAL COMMISSIONABLE VALUE USD]
Best regards,
Yuliana Gu
Hi @Mjwhite1,
Based on my assumption, you may want a if condition like below:
if [BUSINESS TYPE]<>"New Product" and [BUSINESS TYPE]<> "Distributed Capacity"
then 0
else if [NO OF MONTHS]<24
then 0
else if [NO OF MONTHS]>=24 and [NO OF MONTHS]<=36
then (( [NO OF MONTHS] - 12) / 12) * (.50 * [Tier 1 Rate]) * [FINAL COMMISSIONABLE VALUE USD]
else ((36 - 12) / 12) * (.50 * [Tier 1 Rate]) * [FINAL COMMISSIONABLE VALUE USD]
Best regards,
Yuliana Gu
Thank you that worked perfectly! Appreciate the help.
What error are you actually getting?
It'd be much easier to read if you didn't have so much redundant code - it can easily look something like this (clearly needing to get brackets correct):
if [BUSINESS TYPE] <> "New Product" or [BUSINESS TYPE] <> "Distributed Capacity" then 0 else
if [NO OF MONTHS] < 24 then 0 else
[NO OF MONTHS] <= 36 then
(( [NO OF MONTHS] - 12) / 12) * (.50 * [Tier 1 Rate]) * [FINAL COMMISSIONABLE VALUE USD] else
((36 - 12) / 12) * (.50 * [Tier 1 Rate]) * [FINAL COMMISSIONABLE VALUE USD] else
0
I have an EOF error on the : then after the 36. I am new to power BI i have worked with it for a few weeks. It is dealing with two seperate columns.
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 |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |