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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.