• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

customers visited and not visited

Aquila

New Member
Hello, I have two tables, one with customers and the date that have been visited, and the other is a calendar table. I need to show a table with customers who have been visited and another table with those who have not been visited within a range of dates taken from a slicers. I have developed two measures:

Customer visit =
VAR minDate = MIN(DimDate[Date])
VAR MaxDate = MAX(DimDate[Date])
RETURN
CALCULATE( DISTINCTCOUNT(Visits[Name]);
FILTER( ALL(DimDate);
DimDate[Date] >= minDate && DimDate[Date] <= MaxDate
)
)

This works well.

and

Customer no visit =
VAR minDate = MIN(DimDate[Date])
VAR MaxDate = MAX(DimDate[Date])
RETURN
COUNTROWS(
FILTER(ALL(Visits[Name]);
CALCULATE( DISTINCTCOUNT(Visits[Name]);
FILTER( ALL(DimDate);
DimDate[Date] >= minDate && DimDate[Date] <= MaxDate
)
)=0
)
)

This shows well the total number of customers not visited, but not I can show in a table who they are. I have attached the file.

I appreciate the help.
 

Attachments

  • Visits.xlsx
    191 KB · Views: 6
Back
Top