Forum Discussion

PPD's avatar
PPD
Icon for Helper I rankHelper I
5 years ago
Solved

Dynamic date parameters to filter fact tables

I am working on a tabular cube. My dashboard shows all summarized data (Fact Table 1) based on the snapshot date (1st day of each month - 05/01/2021,04/01/2021 etc.) Based on the selected snapshot ...
  • v-yalanwu-msft's avatar
    5 years ago

    Hi, PPD  

     

    You could create a measure by the following formula:

    flag =
    VAR _diff =
        DATEDIFF ( MAX ( 'Fact Table 2'[date] ), MAX ( 'Fact Table 1'[Date] ), MONTH )
    RETURN
        IF ( _diff <= 3 && _diff > 0, 1 )
    

    Then apply Flag measure to Filter:

    The final output is shown below:

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.