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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Products by Customer, in a Desnormalized table.

Hi

I have a table with customer AND products in the same table. This table has many fields, about 20. 

 

CustomerID	ProductID	FieldN..
50	            1	
51	            1	
52	            1	
53	            1	
54	            1	
54	            2	
55	            1	
55	            2	
56	            1	
56	            2	
56	            3	
56	            4	

 

 

I need to create a graph to show the Number of Customer vs Number of Products they have.

How can I achieve that?  

1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

You can easily reach this by distict count Product ID that each customer has.

18.PNG

Hope this helps.

 

Best Regards,

Giotto

View solution in original post

3 REPLIES 3
v-gizhi-msft
Community Support
Community Support

Hi,

 

You can easily reach this by distict count Product ID that each customer has.

18.PNG

Hope this helps.

 

Best Regards,

Giotto

danno
Resolver V
Resolver V

Even if you have a denormalised table, always look to model your data in Power BI to take advantage of performance optimisations and a simpler syntax in DAX, amongst many other reasons : (read this: https://docs.microsoft.com/en-us/power-bi/guidance/star-schema).

Then create measures for Total Customers and Total Products, and add new measures against your data held in your product and customer dimension tables 

 

Please add Kudos if this helps. 

Anonymous
Not applicable

Thanks

The trouble is that the table don't have a key.. I've tried to find a key, but there are many text fields that should be concatenated to create a key, making a really big key and by so, a big model. Is there any way to reduce this giant concatenated key?

I came from Qlikview, and there I used a function called "Autonumber", to automatically create a short key for each distinct row.. but here I can't find something similar

 

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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