Forum Discussion

ak77's avatar
ak77
Icon for Post Patron rankPost Patron
3 years ago

Filter based on other page selection

Hi All, Thanks for helping me till now.

 

i have a new requirement and need to check if its possible in BI:

Page 1 has 2 filters :Date and Code as below

Page 2 has a flat data viz which has below columns

 

The Page 2 needs to filter and show only data

1.for the code selected in page 1

2.selected date in page 1 should be less than date-effective-to column

 

Please let me know if this is possible

 

Thx again

 

3 Replies

    • ak77's avatar
      ak77
      Icon for Post Patron rankPost Patron

      Hi Miguel 

       

      Thanks for reply.  i tried the option and was able to filter out from first condition using sync slicer option. i am still facing issues for 2d filter option. Can u please help with Measure if possible?

      • MFelix's avatar
        MFelix
        Icon for Super User rankSuper User

        Hi ak77 ,

         

        Confirm if my understanding is correct for the second option you want to select for example July 20 2023 and the table should show all the values prior to that date is that correct?

         

        Assuming that you have a relationship between the date table and the table of the effective date you can create a measure similar to this:

        Previous date =
        CALCULATE (
            COUNTROWS ( Table),
            Table[effective date] <= MAX ( 'Date'[Data] ),
            CROSSFILTER ( Table[effective date], 'Date'[Data], NONE )
        )

         

        Now add this measure to your table and the result will be the expected one: