Forum Discussion

Usefulinfo's avatar
Usefulinfo
Icon for Helper I rankHelper I
1 year ago
Solved

Filtering a visual to display data for dates prior to min date of date range filter

Hi All,   Need your help to resolve below query.   I have a date range filter visual and a table visual whcih shows app details (app_name, received date etc). I want to show app count along with ...
  • rajendraongole1's avatar
    1 year ago

    Hi Usefulinfo - To achieve this, you can avoid using REMOVEFILTERS by focusing on maintaining the date context from the filter visual. Instead of removing filters, we can use ALLSELECTED with a condition to include only dates earlier than the minimum selected date in the filter

     

     

    ShowApplication =
    VAR MinFilterDate =
    CALCULATE(
    MIN('Date Table'[Date]),
    ALLSELECTED('Date Table')
    )
    RETURN
    CALCULATE(
    COUNTROWS('App'),
    KEEPFILTERS('App'[Received_Date] < MinFilterDate)
    )

     

    hope this gives you correct app count with date filter. please check

  • vojtechsima's avatar
    vojtechsima
    1 year ago

    Usefulinfo since you use ReceivedDate as Key column for Calendar relationship, modify your solution to this:

    CALCULATE(
        COUNTROWS('Sheet2'),
        DateTable[Date] < StartDate, -- the change is here, using Date column from calendar instead RecievedDate
        -- and also here, since it's different table you have to add these filter as new parameter, so split by comma
        ISBLANK('Sheet2'[Despatch_Date]) &&
        'Sheet2'[Status] <> "close"
        )



     

  • Usefulinfo's avatar
    Usefulinfo
    1 year ago

    Yes, I have all these details. I have tested again and its working fine. 

     

    Thank you so much for your help.