Forum Discussion

cmkp2675's avatar
cmkp2675
Frequent Visitor
1 year ago
Solved

Page-Level Filtering based on the Latest Date

Dear Developers,          I'm a newbie to PBI, my requirement is "I want my Power BI Report/Dashboard visuals should show the "Latest Data" in every VISUALS on every refresh. I tried applying the Pa...
  • v-menakakota's avatar
    v-menakakota
    1 year ago

    Hi cmkp2675 ,

    Try this approach:
    Instead of filtering pages or visuals, control which data is shown through measures.

     

    If the user selects a date via slicer → that date is used.

     

    If the user does not select any date → the latest date is used automatically.

     

    Dont give any visual/page level filters instead use dynamic measure for this-

     

    EffectiveDate = 
    VAR SelectedDate = SELECTEDVALUE(MetricsData[Date])
    VAR LatestDate = CALCULATE(MAX(MetricsData[Date]), ALL(MetricsData))
    RETURN
    IF(ISBLANK(SelectedDate), LatestDate, SelectedDate)

     

    If you have Timeliness, Completeness, Validation on separate pages, just replicate the same logic for each dataset (change the table/column names accordingly).

    Below is the screenshot and pbix file for detailed information



    If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.