Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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êsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |