Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I want have the operator used in a custom column be based on the data in another field but keep getting an error.
For example, my dataset has the following fields
Field A (The DataPoint) Field B (The Measurement Type) Field C- (The Threshold)
3 > 1
I want to write a custom column formula that says:
If [Field A] [Field B] [Field C] then 1 else 0
The formula works if i type in > instead of using [Field B], however, some rows use another operator (like = or <). Is there a way to write the formula with the operator being [Field B]?
Solved! Go to Solution.
Hi @hatcher78
But I have another idea how you can to it:
Measure =
SWITCH(
SELECTEDVALUE([FieldB]),
">", IF([FieldA]>[FieldC],1,0),
"<", IF([FieldA]<[FieldC],1,0),
">=", IF([FieldA]>=[FieldC],1,0),
"<=", IF([FieldA]<=[FieldC],1,0)
)
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
Hi @hatcher78
I really have never seen this anytime in any report so I would say it is not possible to transform a text field into an operator.
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
Hi @hatcher78
But I have another idea how you can to it:
Measure =
SWITCH(
SELECTEDVALUE([FieldB]),
">", IF([FieldA]>[FieldC],1,0),
"<", IF([FieldA]<[FieldC],1,0),
">=", IF([FieldA]>=[FieldC],1,0),
"<=", IF([FieldA]<=[FieldC],1,0)
)
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
6 | |
3 | |
3 | |
3 |
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
7 |