Forum Discussion
katto16
Helper I
3 years agoCount if values from three different columns are unique
Hi. I'm pretty new to Power BI and recently learned how to do Distinct Counts, Calculate, basic DAX etc. I have this thing I'm trying to solve which I have done in Excel but would like to compile all...
amitchandak
Super User
3 years agokatto16 , A new column
=
var _1 = countx(filter(Table, [Unit ID] = earlier([Unit ID]) ), [Unit ID)
var _2 = countx(filter(Table, [Unit ID] = earlier([Actuato rID]) ), [Actuator ID)
var _3 = countx(filter(Table, [Unit ID] = earlier([Module ID]) ), [Module ID)
var _4 = countx(filter(Table, [Unit ID] = earlier([PWA ID]) ), [PWA ID)
return
if(_1+_2+_3+_4+0 >0, 0, 1)
katto16
Helper I
3 years agoHi amitchandak
Thank you very much for your help. I can't seem to create a variable after the first one.
This is the error code.