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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors