Forum Discussion
Count by Group
I need to show the ProductID without the color
Once you have your Calculated Column in the data model, you can create any Visual that you want.
For a simple Table Visual, simply use your ProductID and ColorCount columns. You don't need to show the Color field in your visual.
- PowerBIUser3493 years agoHelper I
Dang... my actual dataset is much more complex and I am not able to do that... the ProductID and Color was too simple.
- PowerBIUser3493 years agoHelper I
This is a better sample dataset... I only added two rows, but shows the problem I am facing with the dax formula you shared above.
Product ID Color Count 123 Red 1 124 Blue 1 125 Blue 1 126 Red 1 127 Yellow 1 128 Red 1 129 Yellow 1 130 Red 1 131 Blue 1 123 Red 1 124 Blue 1 - rsbin3 years agoCommunity Champion
Are you now saying your Table includes duplicates?
Product ID Color Count 123 Red 1 124 Blue 1 123 Red 1 124 Blue 1 Do you want these duplicates counted or not?
- PowerBIUser3493 years agoHelper I
Good question. And sorry for not explaining better. I still need it to return this:
Product ID Group Count 123 4 124 3 125 3 126 4 127 2 128 4 129 2 130 4 131 3 Which means it would be a distinct count of Product ID, but showing the subtotal count for each color.