Forum Discussion

taurius2022's avatar
taurius2022
Frequent Visitor
4 years ago
Solved

Create column based on multiple criterias

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"

 

Clientskwhduration
a00
b00
c1015
d0589
e5510
f014
g210
h110
i03

 

 

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

3 Replies

    • taurius2022's avatar
      taurius2022
      Frequent Visitor

      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: 

       

      • taurius2022's avatar
        taurius2022
        Frequent Visitor

        I have changed the format of data --> kwh : from text to numers.

        Now it works. 

        Thanks