Forum Discussion
Atiroocky
3 years agoFrequent Visitor
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...
- 3 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 measureCount = CALCULATE ( SUM ( 'Table_DHU'[CityLocation] ), ALL ( 'Table_DHU' ), DATESINPERIOD ( 'Table_DHU'[Date], MAX ( 'Table_DHU'[Date] ), - [Parameter], DAY ) )
tamerj1
3 years agoCommunity Champion
Atiroocky
MAX ( 'Table'[Column] ) when used in a calculated column returns the max value in this column becuase there is no filter context. However when used in a measure it will return the max value avialable in the current filter context. In other words, the value is different from one row to another.
Atiroocky
3 years agoFrequent Visitor
Thanks for your explanation. That helps me better understanding.