Forum Discussion
Slicer value dynamical selection of visual
Hi All,
There are 6 visuals on the page which display line chart for "no of orders" over time( month by month) a team receives. for example Team consists of 10 salesmen.
To compare, the requirement is to let user select upto 6 salesmen. Based on the selection of user, for exampe if user chooses 4 sales men, we wanted to show 4 visuals.
There are other ways to compare too but just wanted to stick with this idea to keep 6 visuas per page and show only no of visuals based on no of salesmen seleted.
Thanks in advance
If I create this scenario with example it will be like
Salesman
| SalesmanID | Saleman Name |
| 1 | David |
| 2 | Michael |
| 3 | John |
| 4 | Liza |
| 5 | Andy |
| 6 | Josh |
| 7 | Felix |
| 8 | Toby |
| 9 | Adam |
| 10 | Richard |
Sales
| SalesmanID | OrderDate | OrderID |
| 1 | 10/12/2020 | 1 |
| 1 | 4/4/2020 | 2 |
| 1 | 1/5/2020 | 3 |
| 2 | 7/7/2020 | 4 |
| 3 | 10/12/2020 | 5 |
| 4 | 4/8/2020 | 6 |
| 5 | 1/1/2020 | 7 |
| 4 | 10/12/2020 | 8 |
| 3 | 4/4/2020 | 9 |
| 6 | 7/8/2020 | 10 |
| 7 | 1/1/2020 | 11 |
| 8 | 10/12/2020 | 12 |
| 9 | 4/4/2020 | 13 |
| 8 | 7/9/2020 | 14 |
| 7 | 4/4/2020 | 15 |
| 4 | 10/12/2020 | 16 |
| 4 | 1/1/2020 | 17 |
| 3 | 4/6/2020 | 18 |
| 1 | 7/7/2020 | 19 |
| 2 | 10/12/2020 | 20 |
| 5 | 4/4/2020 | 21 |
| 6 | 1/1/2020 | 22 |
| 7 | 10/12/2020 | 23 |
| 10 | 7/10/2020 | 24 |
| 10 | 1/1/2020 | 25 |
| 10 | 10/12/2020 | 26 |
| 10 | 1/10/2020 | 27 |
| 3 | 3/3/2020 | 28 |
| 6 | 5/5/2020 | 29 |
| 9 | 5/5/2020 | 30 |
| 1 | 10/12/2020 | 31 |
| 2 | 4/4/2020 | 32 |
| 3 | 1/10/2020 | 33 |
| 4 | 7/7/2020 | 34 |
| 5 | 10/12/2020 | 35 |
| 6 | 10/12/2020 | 36 |
| 7 | 4/4/2020 | 37 |
| 8 | 1/11/2020 | 38 |
| 9 | 7/11/2020 | 39 |
| 10 | 10/12/2020 | 40 |
| 1 | 10/12/2020 | 41 |
| 2 | 4/4/2020 | 42 |
| 3 | 1/11/2020 | 43 |
| 4 | 7/7/2020 | 44 |
| 5 | 10/12/2020 | 45 |
| 6 | 11/12/2020 | 46 |
| 7 | 4/4/2020 | 47 |
| 8 | 1/1/2020 | 48 |
| 9 | 7/7/2020 | 49 |
| 10 | 10/12/2020 | 50 |
| 1 | 10/12/2020 | 51 |
| 2 | 4/4/2020 | 52 |
| 3 | 1/1/2020 | 53 |
| 4 | 7/7/2020 | 54 |
| 5 | 10/12/2020 | 55 |
| 6 | 10/12/2020 | 56 |
| 7 | 4/4/2020 | 57 |
| 8 | 1/1/2020 | 58 |
| 9 | 6/11/2020 | 59 |
| 10 | 12/12/2020 | 60 |
3 Replies
- ERD
Community Champion
Hi Anonymous ,
You need to play with bookmarks.
Here is an example: https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
- AnonymousNot applicable
Thanks ERD It very useful.
Do you know when user selects 6 Salesmen using below measure,
SelectedFilterSalesman =VAR ConCat =CALCULATE (CONCATENATEX (VALUES (SALESMAN[Saleman Name] ),SALESMAN[Saleman Name] ,",",SALESMAN[Saleman Name] , 1))VAR IsItFiltered =IF (ISFILTERED ( SALESMAN[Saleman Name] ),ConCat,0)RETURNIsItFilteredResult brings as
David, Felix, Liza, Michael, Richard, Toby
What will be the DAX to store [SelectedFilterSalesman] into 6 measures having each salesman name?
Regards
- AnonymousNot applicable
Anonymous
Instead of bookmarks, you could try to use the newest feature in some of the native visuals called "small multiples." Also, there are visuals in the store from third-party vendors that have small multiples enabled.