Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have an origianl data to show Quantity and USD by product name and by quarter (in format of YYYYQQ) as below.
I want to transform this to the table form at the right side. I know how to unpivot multiple columns into two columns if the columns are the same type, either quantity or US dollar. But i couldn't do two different data types into three columns; so one for quarter that is shared with Quantity and USD.
Solved! Go to Solution.
Or, a better way might be this:
1. Unpivot all columns except Product Name (rename the "Attribute" column to, say "Quarter")
2. Add a conditional column using this condition:
3. Pivot the column you just created:
4. Replace values (to get rid of the $_ prefix):
5. Then group the rows:
You can duplicate the data table, then unpivot the quantities in one copy of table and the dollar amounts in the other copy.
Finally, you can bring it all back together again with a 'Merge Queries' operation.
Let me know if you need more detail on the steps required to do this.
thanks for solution....
kudos
regards,
Rahul M
Or, a better way might be this:
1. Unpivot all columns except Product Name (rename the "Attribute" column to, say "Quarter")
2. Add a conditional column using this condition:
3. Pivot the column you just created:
4. Replace values (to get rid of the $_ prefix):
5. Then group the rows:
Hi @MalS
I have a same problem, please help me on this,
https://community.powerbi.com/t5/Desktop/Conditional-Formatting-Slicer/m-p/207232#M91309
Many Thanks,
Thiyaga
Hi MalS, the second one," a better way", works very well. it's a brilliant idea. thanks a lot for your help.
Covering 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 |
---|---|
109 | |
102 | |
84 | |
79 | |
70 |
User | Count |
---|---|
120 | |
110 | |
95 | |
82 | |
77 |