Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am trying to Unpivot data, but getting Duplicate data while data modelling in PBI.
The 1st table is Soure and the 2nd one is my expected.
Please see the screenshot:
Thank
Shishir Goel
Solved! Go to Solution.
Hi @shishir999 ,
1. You could upivot the columns Act_Jan,Est_Jan,Diff_Jan,...,Act_Mar,Est_Mar,Diff_Mar in Query Editor.
2. Add conditional columns(optional). If you create this column, you could get your desired output like that in your image. If you don't create this custom column, you will get the output like this.
3. If you create the conditional column in Query Editor, you need sort by column under Data view.
4. Then you could create your desired matrix.
For more details about how to create the conditional column, you could refer to my attachment.
Best Regards,
Cherry
Hi @shishir999 ,
By my tests, based on your data sample, you could achieve your desired output with Matrix visual in Power BI like below.
If you still need help, feel free to ask.
Best Regards,
Cherry
Thanks Cherry, I tried implementing the same earlier.
As in Value, I need to add multiple fields. So, my requirement is to Unpivot the data from source using data modelling, followed by rest of the calculations and use less no. of fields.
Please advise.
Regards
Shishir
Hi @shishir999 ,
1. You could upivot the columns Act_Jan,Est_Jan,Diff_Jan,...,Act_Mar,Est_Mar,Diff_Mar in Query Editor.
2. Add conditional columns(optional). If you create this column, you could get your desired output like that in your image. If you don't create this custom column, you will get the output like this.
3. If you create the conditional column in Query Editor, you need sort by column under Data view.
4. Then you could create your desired matrix.
For more details about how to create the conditional column, you could refer to my attachment.
Best Regards,
Cherry
Bingo....Thanks Cherry.
I was able to do the transformation i.e. in Step-2, but the Conditional column makes the magic.
Appreciated your help.
Regards
Shishir
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
73 | |
56 | |
38 | |
31 |
User | Count |
---|---|
84 | |
63 | |
63 | |
49 | |
45 |