Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi all,
I have a dataset with a following structure.
I want to insert a conditional column which would say: if kwh = o and duration > 2, then tell "bad", otherwise "ok"
| Clients | kwh | duration |
| a | 0 | 0 |
| b | 0 | 0 |
| c | 10 | 15 |
| d | 0 | 589 |
| e | 55 | 10 |
| f | 0 | 14 |
| g | 2 | 10 |
| h | 1 | 10 |
| i | 0 | 3 |
I have tried multiple options from conditional columns, to DAX as well as creating a column.
Nothing works for me.
Power BI Forums were of no help to me.
Thanks and BR
Solved! Go to Solution.
Hi, @taurius2022
Please try formula as below:
Calculated column:
Column = if('Table'[kwh]=0&&'Table'[duration]>2,"bad","ok")
Meaure:
Measure = if(MAX('Table'[kwh])=0&&MAX('Table'[duration])>2,"bad","ok")
Best Regards,
Community Support Team _ Eason
Hi, @taurius2022
Please try formula as below:
Calculated column:
Column = if('Table'[kwh]=0&&'Table'[duration]>2,"bad","ok")
Meaure:
Measure = if(MAX('Table'[kwh])=0&&MAX('Table'[duration])>2,"bad","ok")
Best Regards,
Community Support Team _ Eason
Calculated column (had this before) : DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values. --> #Error
Measure:
I have changed the format of data --> kwh : from text to numers.
Now it works.
Thanks
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 82 | |
| 48 | |
| 36 | |
| 31 | |
| 29 |