98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Power BI training and help » Count the number of unique visits (date for each customer)
Count the number of unique visits (date for each customer)
Resolved · High Priority · Version 2019
Christian has attended:
Excel PowerPivot course
Power BI Modelling, Visualisation and Publishing course
Count the number of unique visits (date for each customer)
I have a table of ticket sales, showing each individual ticket sold and the date of the event. In a related table (Customers), I have a list of CRM ID's and names.
A customer buys 5 x tickets to one event on one date, then another 3 tickets to an events on another date. I need to have either a measure or a column in a table to show how many distinct dates a customer has visited. In this case, this would be 2 visits. I'm not sure if this should be a measure, or a column in the Customers table.
Plus, I need help on how to write the formula please!
thanks!
RE: Count the number of unique visits (date for each customer)
I 'think' this might have worked:
UniqueVisits = CALCULATE(DISTINCTCOUNT(FactTickets[Event Date]),USERELATIONSHIP(FactTickets[ftClientGuid],DimClients[dcClientGUID]))
ftclientguid and dcclientguid are the CRM ID relation
Does that look about right? I've done some testing but would be nice to know if I've used the right type of formula?
Christian
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Power BI tip:Utilize Relationships EffectivelyEstablish clear and meaningful relationships between tables in your data model. Proper relationships enable Power BI to navigate and aggregate data accurately. Pay attention to cardinality and cross-filter direction when setting up relationships to ensure the results align with your analytical requirements. |