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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
praveenpearl
Frequent Visitor

Count of Customers based on count of their orders

Hi, 

 

I've a Product field( I have 12 products in it) and a Cus no field. I need to build a visual like, no of customers ordered just one product out of those 12 products and no.of customers ordered just two products out of those 12.etc.,

 

Please help me with this.

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Given an Enter Data query like this:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PcaxDQAgCATAXagtRFB0FsL+a/j5guKSyxSVATVSVs96ji1u9w5mXGDOXWxzDzucTjSk6gM=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ProductNo = _t, CustomerNo = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ProductNo", Int64.Type}, {"CustomerNo", Int64.Type}})
in
    #"Changed Type"

You could create a table visual where you have an unsummarized CustomerNo and a distinct count of ProductNo and you could filter that to the specific count you are looking for.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Given an Enter Data query like this:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PcaxDQAgCATAXagtRFB0FsL+a/j5guKSyxSVATVSVs96ji1u9w5mXGDOXWxzDzucTjSk6gM=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ProductNo = _t, CustomerNo = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ProductNo", Int64.Type}, {"CustomerNo", Int64.Type}})
in
    #"Changed Type"

You could create a table visual where you have an unsummarized CustomerNo and a distinct count of ProductNo and you could filter that to the specific count you are looking for.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors