Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
Need a help with if Exist in DAX, below is my problem statement :
I need to pivot two columns in my table for below data :
Channel | Value |
Channel | one |
Channel | one |
Channel | one |
Channel | one |
Channel | one |
Channel | two |
Channel | two |
Channel | two |
Channel | two |
After pivot above columns it should transform as per below :
Channel |
one |
one |
one |
one |
one |
two |
two |
two |
two |
But if Column Channel already exists then it should not pivot instead it need to copy values from Value column.
Thanks,
Rahul
Hi @Rahul66303,
You should do this in the query editor using the pivot option.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsYes that is we can do pivot in query editor but my ask is before doing pivot it should check for column (in this case Channel) already exist on table if Yes then it should just copy the value of channel and discard pivot.
Channel | Value |
Channel | one |
Channel | one |
Channel | one |
Channel | one |
Channel | one |
Channel | two |
Channel | two |
Channel | two |
Channel | two |
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |