Forum Discussion

rmeng1975's avatar
rmeng1975
Frequent Visitor
2 years ago
Solved

Measure to filter a table with last date values

https://1drv.ms/u/s!Am7PNkfu1RRdgrp4ixgtjrtJP22N_w?e=86giCO  The objective is if I don´t filter the date slicer by default the table shows the last day activations (last day = 06/02/2024 and Type ="...
  • talespin's avatar
    2 years ago

    hi rmeng1975 ,

     

    Please try this.

    Step1 : Create below measure.

    Step2: Set a filter on Table visual as shown in screenshot.

     

    Create this measure

    IsFiltered =
    VAR _IsFilteredDate = SELECTEDVALUE('Date'[Date])
    VAR _IsFilteredCanalDate = SELECTEDVALUE(Canal[Date])
    VAR _LastActivatedDate = CALCULATE([# Last Date Activated], REMOVEFILTERS(Canal))
    VAR _LastDateActivations = [#Last Date Activations]
    RETURN IF(
                ISBLANK(_IsFilteredDate),
                IF(_IsFilteredCanalDate = _LastActivatedDate && NOT(ISBLANK(_LastDateActivations)), 1 , 0 ),
                1
    )