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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Syndicate_Admin
Administrator
Administrator

Grouping

Hello everyone.

I have the following data:

LFDSTHGroup_0-1685102681802.png

As you can see it is the same client, who has been visited on 3 different days, and on some of those days there has been more than one meeting

What I have is the data of the count of meetings I have had with that client (5), but what I am also looking for is the number of visits per client (3), regardless of how many meetings I have had.

That is, I seek to group by date: I have visited the Contoso client on (3) different dates, in this year (chosen period)

I have tried with this formula, but I do not achieve the desired result

CALCULATE(COUNT(Appointments[Client]),FILTER(Appointments,DISTINCT(Appointments[Meeting Date])),USERELATIONSHIP('Chosen Period'[Date],Appointments[Meeting Date]))

Thanks for the help

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Thank you very much for the reply.

Although the solution you propose only works if the data is filtered by a single client (1): meetings (5) and visits (3)

LFDSTHGroup_0-1685364168195.png

But when I want to see the visits of all customers, then the data is not correct (it should be a number between 187 and 297)

LFDSTHGroup_1-1685364378413.png

Number of visits made (current) = CALCULATE(SUMX(VALUES(Dating[Start date]),DISTINCTCOUNT(Dating[_sth_cuenta_value])),USERELATIONSHIP('Current Period'[Date],Dating[Start date]))
Where can the error lie?
Thanks for the help
Syk
Resident Rockstar
Resident Rockstar

Try this!

Visits to Client = sumx(VALUES(Appointment[Meeting Date]),DISTINCTCOUNT(Appointment[Client]))

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.