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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

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


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

@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.

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


@mwegener  works perfectly!!!  

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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