Forum Discussion

Atiroocky's avatar
Atiroocky
Frequent Visitor
2 years ago
Solved

Column in datatable with dynamic function paramater

Hello,   I managed to calculate a cumulative rolling day in a column of my table. I use the function "DATESINPERIOD"   I would like to replace the "static" number parameter by a dynamic paramete...
  • tamerj1's avatar
    2 years ago

    Hi Atiroocky 
    Calculated columns cannot be dynamic as they do not interact with the fiter conext of the report. This has to be a measure

    Count =
    CALCULATE (
        SUM ( 'Table_DHU'[CityLocation] ),
        ALL ( 'Table_DHU' ),
        DATESINPERIOD (
            'Table_DHU'[Date],
            MAX ( 'Table_DHU'[Date] ),
            - [Parameter],
            DAY
        )
    )