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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
goodbecenergy
Resolver I
Resolver I

Counting occurence of customer ID

Hello & thanks in advance for your help. 

 

I have a table of responses from the website which has been anonymised so for each line there is a unique User ID.

 

I'm trying to count frequent flyers and show the messages for the person who has been in contact the most.

 

I have tried: 

ID_Count = CALCULATE(COUNTROWS(hotjar),FILTER(hotjar,hotjar[ID_User]<>""))

 

ID_No of Ref = CALCULATE(
    COUNT(hotjar[ID_User ID]),
    FILTER(hotjar,hotjar[ID_]= EARLIER(hotjar[ID_User ID])))  - which is the closest so far
 
I've also tried COUNTROWS in various iterations
 
Once I have the number, I would also like a table showing the messages of the highest frequent flyer. 
 
Thanks again
 
1 ACCEPTED SOLUTION
goodbecenergy
Resolver I
Resolver I

I managed to find a way to get around this... by using a table rather than a chart. Thanks for all the suggestions

 

goodbecenergy_0-1695379697886.png

 

View solution in original post

3 REPLIES 3
goodbecenergy
Resolver I
Resolver I

I managed to find a way to get around this... by using a table rather than a chart. Thanks for all the suggestions

 

goodbecenergy_0-1695379697886.png

 

v-yangliu-msft
Community Support
Community Support

Hi  @goodbecenergy ,

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

If convenient, you can show your expected results in the form of pictures, and we can help you better.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

goodbecenergy
Resolver I
Resolver I

So I know that the ID_No of Ref column is correct but it isn't counting 2 entries because 2 were submitted in the same day...twice. 

 

I've managed to create the table by including the date and unique reference number then using the column as a filter showing Top 1 by ID_No of Ref.

 

But yeah.. how to count two entries on one day please.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.