Forum Discussion
Change calculated table dynamically on slicer selection
- 6 years ago
Hi Ani26 ,
Calculated tables cannot be affect dinamically by slicers, so you cannot have a dinamic calculted table on the fly to use on a visualization, however you can create a measure that makes use of a calculated table (as a variable) and then make it dinamic with the use of slicers.
I was looking at your example and didn't understood what you want to create is the Bracket part or only the filtering of the data by bit?
- 6 years ago
Hi Ani26 ,
As MFelix said, it can't create a calculated table dynamically based on slicers. But you can do it in measures. Here is my sample that you could have a try.
Month-Year = DISTINCT('Date'[Month-Year])Bracket = VAR X = CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Date', 'Date'[Month-Year] = [S] ) ) RETURN SWITCH ( TRUE (), X > 0 && X < 1, "0-1", X >= 1 && X < 2, "1-2", x > 2, ">2", BLANK () )BIT = VAR BIT = SEARCH ( "BIT", MAX ( 'Table'[Attribute] ),, 1000 ) RETURN CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Date', 'Date'[Month-Year] = [S] && BIT <> 1000 ) )
Hi Ani26 ,
Calculated tables cannot be affect dinamically by slicers, so you cannot have a dinamic calculted table on the fly to use on a visualization, however you can create a measure that makes use of a calculated table (as a variable) and then make it dinamic with the use of slicers.
I was looking at your example and didn't understood what you want to create is the Bracket part or only the filtering of the data by bit?