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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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