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
Anno2019
Helper IV
Helper IV

Count of Customer Name based on measure value

Hi Guru's

 

Not sure what I am missing here.

I have two calculated measures [Trend] & [Class], I would like to count the number of customers [Customer Name] there are using the results of the calculated measures.  The below refers:

 

My [Number of Customers] is also a measure that is just a distinct count of [Customer Name].

All the usual formulas are failing.  I have added my example file for ease of reference.

 

https://www.dropbox.com/s/t6qraiv5zry960k/Example%20file.dtcount%20of%20customer%20using%20measure%2...

 

dtcount customer based on measure value.JPG

 

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anno2019 ,

 

check this.

 

 

Number of New AA Customers = CALCULATE( [Number of Customers]; FILTER(SUMMARIZE('DATA Sheet';'DATA Sheet'[Customer Name];"@Trend";[Trend];"@Class";[Class]); [@Trend] = "New" && [@Class] = "AA"))

 

 

 

Number of New A Customers = CALCULATE( [Number of Customers]; FILTER(SUMMARIZE('DATA Sheet';'DATA Sheet'[Customer Name];"@Trend";[Trend];"@Class";[Class]); [@Trend] = "New" && [@Class] = "A"))

 

 

 

Number of New Customers = CALCULATE( [Number of Customers]; FILTER(SUMMARIZE('DATA Sheet';'DATA Sheet'[Customer Name];"@Trend";[Trend];"@Class";[Class]); [@Trend] = "New"))

 

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

Check if this work

 

https://www.dropbox.com/s/6q12ii03z9lpftt/Example%20file.dtcount%20of%20customer%20using%20measure%2...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

Thank you for the reply, and for trying to assist....I don't think it is calculating correctly.

Your formula has no errors messages but for instance.  there are 3 "AA" Customers where the [Trend] is "New" but your calculation returns only 2.

There are 2 "A" Customers where the [Trend] is "New" but your calculation returns 11.

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anno2019 ,

 

check this.

 

 

Number of New AA Customers = CALCULATE( [Number of Customers]; FILTER(SUMMARIZE('DATA Sheet';'DATA Sheet'[Customer Name];"@Trend";[Trend];"@Class";[Class]); [@Trend] = "New" && [@Class] = "AA"))

 

 

 

Number of New A Customers = CALCULATE( [Number of Customers]; FILTER(SUMMARIZE('DATA Sheet';'DATA Sheet'[Customer Name];"@Trend";[Trend];"@Class";[Class]); [@Trend] = "New" && [@Class] = "A"))

 

 

 

Number of New Customers = CALCULATE( [Number of Customers]; FILTER(SUMMARIZE('DATA Sheet';'DATA Sheet'[Customer Name];"@Trend";[Trend];"@Class";[Class]); [@Trend] = "New"))

 

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


@mwegener  works perfectly!!!  

 

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