Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi I have the following measure that I belive is correct:
Solved! Go to Solution.
Hi @Anonymous ,
You need to use double ampersand '&&' between your logical arguments. A single ampersand simply tries to concatenate text.
I'd also recommend using the SWITCH function in place of your nested IF statements as it makes the code easier to read.
Below is my table:
The following DAX might work for you:
Measure =
var Bonus_Percentage_Measure = SELECTEDVALUE('Table'[Bonus Percentage Measure])
var result =
SWITCH(
TRUE(),
Bonus_Percentage_Measure>=1.05 && Bonus_Percentage_Measure < 1.1 ,"Tier 1",
Bonus_Percentage_Measure>=1.1 && Bonus_Percentage_Measure < 1.5 , "Tier 2",
Bonus_Percentage_Measure>=1.5 && Bonus_Percentage_Measure < 2.2 , "Tier 3",
Bonus_Percentage_Measure >= 2.2 , "Tier 4"
)
return result
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You need to use double ampersand '&&' between your logical arguments. A single ampersand simply tries to concatenate text.
I'd also recommend using the SWITCH function in place of your nested IF statements as it makes the code easier to read.
Below is my table:
The following DAX might work for you:
Measure =
var Bonus_Percentage_Measure = SELECTEDVALUE('Table'[Bonus Percentage Measure])
var result =
SWITCH(
TRUE(),
Bonus_Percentage_Measure>=1.05 && Bonus_Percentage_Measure < 1.1 ,"Tier 1",
Bonus_Percentage_Measure>=1.1 && Bonus_Percentage_Measure < 1.5 , "Tier 2",
Bonus_Percentage_Measure>=1.5 && Bonus_Percentage_Measure < 2.2 , "Tier 3",
Bonus_Percentage_Measure >= 2.2 , "Tier 4"
)
return result
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Please check wether you Measue is in % or not.( Basically should not a text)
I Hope I answered your question.
@Uzi2019 the Bonus Percent Measure is a %
I think the problem is the Bonus Tier the measure I wrote is showing as General. I do not see an option to change the format to text
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
54 | |
37 | |
31 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |