cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aishwar04 Regular Visitor
Regular Visitor

Show customer data for selected months

Hi Team

 

I have a table with customer name, Month like 2018 07-Jul,Order id. Suppose I select Months as May, June and July(in the mentioned format 2018 07-Jul), I only want to show those customer name who have a order for all the selected months. Suppose customer Alex has order id's for May,June and July then show Alex and John has order in June and July then don't show John.

 

 

4 REPLIES 4
Super User
Super User

Re: Show customer data for selected months

try putting this measure in the visual filter while filtering to TRUE

Measure = 
VAR SelectedPeriods =
    ALLSELECTED ( 'Table'[Month] )
VAR PeriodsPerCustomer =
    SUMMARIZE ( 'Table', 'Table'[Month], 'Table'[Customer] )
RETURN
    IF (
        COUNTROWS ( SelectedPeriods ) = COUNTX (PeriodsPerCustomer, [Month] ),
        TRUE,
        FALSE
    )
Aishwar04 Regular Visitor
Regular Visitor

Re: Show customer data for selected months

Hi @Stachu @GilbertQ

 

I have used the DAX you mentioned as a measure instead of TRUE(), I have CALCULATE(COUNT(column),ALLSELECTED(MONTH)) so its working fine for selected 3 Months but its not showing the breakdown for the users for the 3 selected months.

Aishwar04 Regular Visitor
Regular Visitor

Re: Show customer data for selected months

Hi @Stachu @GilbertQ 

 

If I select 1 month can we show only thoe customers who have sales in the last 3 months. Suppose if I select Aug it should show customers who have made sales in June,July and Aug.

Highlighted
Super User
Super User

Re: Show customer data for selected months

Hi there,

This could possibly be done. The challenge is understanding what is selected and to then go back 3 months based on what month you have selected.

Do you has some sample data and the expected result?
Did I answer your question? Mark my post as a solution!
"Proud to be a Datanaut!"