Forum Discussion

d_sandip59's avatar
d_sandip59
Icon for Helper I rankHelper I
6 years ago
Solved

How to load data in a table based on Max date for the first time

Hi, I want to load data in a table based on Max date for the first time when the report will load, but if user choose another date from date slicer it will load data accordingly. So if user deselect...
  • v-yingjl's avatar
    v-yingjl
    6 years ago

    Hi d_sandip59 ,

    Based on your previously measure, you can create a new table to extract date first:

    Table = DISTINCT('EDG_COUNT_STATUS'[Date])

    Then try to create this measure:

    Date filter = 
    VAR _date =
        SELECTEDVALUE ( EDG_COUNT_STATUS[Date] )
    RETURN
        IF (
            NOT ( ISFILTERED ( 'Table'[Date] ) ),
            [MaxDateFilter],
            IF ( _date IN FILTERS ( 'Table'[Date] ), 1, 0 )
        )

     You can put this measure in the visual filter of table to solve this case:

    default date valueafter choosing date manually

    Here is the demo, please try it:

    PBIX 

     

    Best Regards,
    Yingjie Li

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.