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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
MonkeySam
Frequent Visitor

How to display customer count by their purchase method?

Hi All,
I have a set of table showing the qty by purchase method per customer as below:

MonkeySam_0-1610964216390.png


I was able to manage to breakdown the purchase method pattern (not in professional way) and display if the customer purcahsed by either fully manual, digital (EDI + Online) or combined methods as below:

MonkeySam_1-1610964243446.png


My challenge here is, instead of showing the purchase method pattern in a table, I would like to show the customer count by purchase method pattern in Card visualization. The desired outcome would be:
1. Total Customers: 8
2. Total Customers Manual Only: 1
3. Total Customers Digital Only: 3
4. Total Customers Combined Digital & Manual: 4

Can someone please help with in creating the appropriate Measures? Thanks.

 

My Example Pbix file 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @MonkeySam ,

 

You have two options one that you need to do more 3 measures using the ones you already have and another one using calculation groups that will allow you to only do a single measure and use that one with the 3 previous measures.

 

Solution one create the following measures:

 

Digital Only Customers = 
var temp_Table = SUMMARIZE(Sales, Sales[Customer ID], "Digital", [Digital Only])
return
COUNTROWS(FILTER(temp_Table, [Digital] <> BLANK()))

Manual Only Customers = 
var temp_Table = SUMMARIZE(Sales, Sales[Customer ID], "Manual", [Manual Only])
return
COUNTROWS(FILTER(temp_Table, [Manual] <> BLANK()))

Combined Only Customers = 
var temp_Table = SUMMARIZE(Sales, Sales[Customer ID], "Combined", [Combined Digital & Manual])
return
COUNTROWS(FILTER(temp_Table, [Combined] <> BLANK()))

Now had this measures to the cards you need.

 

Second option:

 

Create a calculation group (Creating Calculation Groups in Power BI Desktop ) with the following measure:

VAR temp_Table =
    SUMMARIZE ( Sales, Sales[Customer ID], "Measure_Selected", SELECTEDMEASURE () )
RETURN
    COUNTROWS ( FILTER ( temp_Table, [Measure_Selected] <> BLANK () ) )

 

Now use the table in this calculation group to filter out the card with the previous measure check the image below and pbix file.

 

customer_count.gif

 


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 @MonkeySam ,

 

You have two options one that you need to do more 3 measures using the ones you already have and another one using calculation groups that will allow you to only do a single measure and use that one with the 3 previous measures.

 

Solution one create the following measures:

 

Digital Only Customers = 
var temp_Table = SUMMARIZE(Sales, Sales[Customer ID], "Digital", [Digital Only])
return
COUNTROWS(FILTER(temp_Table, [Digital] <> BLANK()))

Manual Only Customers = 
var temp_Table = SUMMARIZE(Sales, Sales[Customer ID], "Manual", [Manual Only])
return
COUNTROWS(FILTER(temp_Table, [Manual] <> BLANK()))

Combined Only Customers = 
var temp_Table = SUMMARIZE(Sales, Sales[Customer ID], "Combined", [Combined Digital & Manual])
return
COUNTROWS(FILTER(temp_Table, [Combined] <> BLANK()))

Now had this measures to the cards you need.

 

Second option:

 

Create a calculation group (Creating Calculation Groups in Power BI Desktop ) with the following measure:

VAR temp_Table =
    SUMMARIZE ( Sales, Sales[Customer ID], "Measure_Selected", SELECTEDMEASURE () )
RETURN
    COUNTROWS ( FILTER ( temp_Table, [Measure_Selected] <> BLANK () ) )

 

Now use the table in this calculation group to filter out the card with the previous measure check the image below and pbix file.

 

customer_count.gif

 


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



Hi Miguel,

Appreciate your amazing solutions. Both options work fine and created the exact result I am looking for.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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