Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
wicker
Frequent Visitor

Countrows with creating pivot table

I have table from screenshot and want to recieve something like this:

111.jpg

 

ID             IN       OUT

534303      8           0

61486        0           8

1010454    3           0

2018139    7           4

etc...

 

I've tried to create another table with distinct values from one of this columns, but then I can't create two active relationships with the first table

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @wicker,

 

I don't understand completly the question please explain me the following.

 

  • Your two columns are filled with the same numbers correct?
  • The result below means that the 1010454 is 3 times in the first columns and 0 times in the second column

    ID             IN       OUT

    1010454    3           0

If this is the case the easist way is to unpivot both columns and then make a visual table based on the attribute column:

SS.png

 

See attach PBIX file with example.

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @wicker,

 

I don't understand completly the question please explain me the following.

 

  • Your two columns are filled with the same numbers correct?
  • The result below means that the 1010454 is 3 times in the first columns and 0 times in the second column

    ID             IN       OUT

    1010454    3           0

If this is the case the easist way is to unpivot both columns and then make a visual table based on the attribute column:

SS.png

 

See attach PBIX file with example.

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



wicker
Frequent Visitor

Yes, you are understand me correct, thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.