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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.