Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic flag with a date slicer
Hi community, Is it possible to create a dynamic column or something with the same functionality? I need this to flag the rows in a table dinamically depending on a date slicer. So I have a t...
- 6 years ago
Hi Anonymous
Try something like this.
filter = VAR __maxSelectedDate = GROUPBY( CALCULATETABLE( FILTER( 'Table', 'Table'[Date] <= MAX( 'Dates'[Date] ) ), ALLEXCEPT( 'Table', 'Table'[Store] ) ), 'Table'[Store], "@maxDate", MAXX( CURRENTGROUP(), 'Table'[Date] ) ) RETURN CALCULATE( COUNTROWS( 'Table' ), KEEPFILTERS( TREATAS( __maxSelectedDate, 'Table'[Store], 'Table'[Date] ) ) )Sum of filter = CALCULATE( SUM( 'Table'[Value] ), FILTER( 'Table' , [filter] ) )Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Mariusz
Community Champion
6 years agoHi Anonymous
Also, you can use the filter measure as a visual filter like below, then you don't need to add it to every measure.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Mariusz
If this post helps, then please consider Accepting it as the solution.