Forum Discussion
Use single Slicer to filter rows for multiple date column
Hi kaushikhalvadia ,
Okay, I see. I assumed you wanted to show metrics around these dates rather than just filter the table based on an OR condition. No matter, we've done half the work we need to do anyway.
1) In your modelling screen, double-click the active relationship and, in the dialog, set it to inactive.
2) Update your [_noofOrders] measure to this:
// Now seeing your model, this may actually be called _noofNewCustomers or similar
_noofOrders =
CALCULATE(
DISTINCTCOUNT(NewCustomer[Number])
USERELATIONSHIP(CalendarTable[Date], NewCustomer[Date])
)
3) Create a new filter measure:
_visualFilter = IF([_noofOrders] > 0 || [_noofFirstOrders] > 0, 1)
4) place your [_visualFilter] measure into the visual filter area of your table, then set it to 'is 1'.
This should now work as required.
Pete
- BA_Pete3 years agoSuper User
It looks like it's all set up correctly, but can't see the output or why it's not as expected.
Can you give me a bit more info about why this isn't working how you need it to please? It worked fine in my own tests.
If you can provide a small bit of anonymised example data from your NewCustomer table (just [ID], [Date], [FirstOrderDate]) I can knock you up a working sample file.
Pete
- kaushikhalvadia3 years agoRegular Visitor
Hi BA_Pete
The same question I have asked in a different way and with SQL query. Could you please see this?