cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
12nirk
New Member

Line item with multiple tag/categories

Hi, in need of some help - could be a very simple fix. 

I have a large db with line items with multiple tags (both high level tag and low level sub-tag)

Each line item may have more than one tag/sub-tag and also may have the same high level tag twice but a different low level sub-tag. I essentially want to create a pivot table showing tag > under it sub-tag. Is there a way to do this with PowerBI? thanks in advance!

 

a.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Line item with multiple tag/categories

So like the attached?


---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

7 REPLIES 7
Super User IV
Super User IV

Re: Line item with multiple tag/categories

I think you will need to unpivot your data.


---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Super User II
Super User II

Re: Line item with multiple tag/categories

Hi, before I say "Yes", can you please show your excpected result to help us understand completely your idea?

Regards,



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog


12nirk
New Member

Re: Line item with multiple tag/categories

It is not pivoted? I want a pivot table or essentially a table displaying:

 

Tag (X)                             Count

----Sub-Tag (a)                Count

----Sub-Tag (b)                Count 

Tag (Y)                              Count 

 

W all the tags collated. Etc...

 

Thanks 

12nirk
New Member

Re: Line item with multiple tag/categories

Sorry, the problem I am having is that there are some lines w say 

 

Tag X, Sub-tag A but also Tag X, Sub-tag B?? Hope that helps 😕

Super User II
Super User II

Re: Line item with multiple tag/categories

Ok. The data is like "pivot". So you can select your tag columns in edit queries and look for the "unpivot columns" option to make that expected result work.

 

Hope this helps,



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog


Super User IV
Super User IV

Re: Line item with multiple tag/categories

So like the attached?


---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

12nirk
New Member

Re: Line item with multiple tag/categories

legends! Thank  you both for your help 🙂

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors