Forum Discussion

PLHM's avatar
PLHM
Icon for Advocate I rankAdvocate I
1 year ago
Solved

Measure filter for a table based on 2 slicers

Good day   I have a report whereby I have 2 slicers. One with a date range and another with a single select drop down. I want to be able to filter my results as per the attempted measure below:   ...
  • PLHM's avatar
    PLHM
    1 year ago

    The amount of data that I have in my report and then with that the visuals to then change to make it anonymous data and the time this would take I did a little more research and found using a parameter I could swith between the 2 date options I wanted to filter on and that worked for been able to toggle between the 2 options of which date to filter on. I am still struggling with been able to filter by either of the dates, but for now it should be "good enough"

  • mark_endicott's avatar
    1 year ago

    PLHM - OK this information indicates you are trying to slice with two date columns from the same table. In which case it's no wonder your measures are returning blank. Your date filtering is counteracting each other and reducing the rows to 0. 

     

    As well as the parameter I would suggest implementing one or more date tables from which you can remove / change filter context in different situations. This  can be achieved via DAX code or a parameter as you say. 

     

    If you implement one date table for both columns, make sure the relationships are in-active and you use USERELATIONSHIP inside CALCULATE measures to activate the relationships when necessary. 

     

    v-kpoloju-msft - if you are looking to close this one off as solved, I suggest we do so with this response. It is the best we can do in this situation. 

     

    If I answered your question please mark my post as the solution, it helps others with the same challenge find the answer!