Forum Discussion
Dynamically change dimension based on Slicer value
- 3 years ago
Hi ahanfouf
A type of automatic selection can be achieved with field parameters and another small manipulation with Dax.
Please follow these steps:
1. create field parameters for months /years
2. create a measure for "automation"
Slicer_sel_falg =VAR Numyears =DISTINCTCOUNT ( 'Data Table'[Year] )VAR CurrentDateField =MIN ( 'Date axis'[Date axis] )RETURNINT (OR (AND ( Numyears = 1, CurrentDateField = "Start of Month" ),AND ( Numyears > 1, CurrentDateField = "Year" )))3. filter put field parameter as axis X and filter by this flag :
*Works perfectly as a tooltip too.
To follow my steps, here's a link to my file with an example:Link
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi ahanfouf
A type of automatic selection can be achieved with field parameters and another small manipulation with Dax.
Please follow these steps:
1. create field parameters for months /years
2. create a measure for "automation"
3. filter put field parameter as axis X and filter by this flag :
*Works perfectly as a tooltip too.
To follow my steps, here's a link to my file with an example:Link
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly