Forum Discussion

D4life's avatar
D4life
Regular Visitor
2 years ago
Solved

Parameter fields display only data for the current month by default

I created a table with parameter fields. There are about 30 different columns in the parameter filed. I want the table to only should records for only the current month. Then when the date slicer is ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi D4life 

     

    I understand your needs, please try the following ways:

    “Table”

     

     

    Delete the relationship between two tables.

     

     

    Create a measure. If the date matches the selection in the slicer, it is marked as 1, otherwise 0. If slicer is not selected, mark the day date as 1.

     

    Measure Parameter = 
    VAR _SelectDate = VALUES('Date'[Date])
    RETURN
    IF(
        ISFILTERED('Date'[Date])
        && 
        SELECTEDVALUE('Table'[Date]) in _SelectDate,
        1,
        IF(
            NOT(ISFILTERED('Date'[Date]))
            &&
            SELECTEDVALUE('Table'[Date]) = TODAY(),
            1,
            0
        )
    )

     

    Apply this measure to the filters pane.

     

     

     

    Create a table visual.

     

     

    Here is the result.

     

     

     

    Regards,

    Nono Chen

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