Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
mehupbi
Frequent Visitor

selected slicer(multi select) generate multi visuals w.r.t slicer selected to show comparison

I have a slicer where different categories i will select multiple scenario id from slicer for ex: i selected three scenarioid in slicer.

i need to populate 3 stack bar visuals so that user can compare 3 visuals which is doing good.

this is just created for o/p ref, https://filetransfer.io/data-package/XCd5hSoZ#link

if i deselect any of selected value in slicer, for ex: already i have selected 3 scenario ids. if i deselect one of them, then - only two visuals i need to populate which means other one should disappear automatically.

 

user can select only max 4 in slicer i.e even user select more than 4 we will show only 4 visuals. if nothing selected, one visual i need to show.

am new to this, please suggest me how an i achieve this

here is  my test data https://filetransfer.io/data-package/0V4TnqIe#link

1 ACCEPTED SOLUTION
v-linyulu-msft
Community Support
Community Support

Hi,@mehupbi 

To meet your needs I have created the following visualization object:

vlinyulumsft_0-1715596645750.png

Here is my solution:

1.First, you need to create a virtual table with the following calculation table:

 

Table = VALUES(testdata[scenarioId])

 

2.I made changes to the filtering in order to limit the display to just four:

vlinyulumsft_2-1715596751047.png

3.Finally I created the following metric and replaced it with slobVolu in the visualization object:

 

Measure = 
VAR _LIST = VALUES('Table'[scenarioId])
RETURN
IF(ISFILTERED('Table'[scenarioId]),IF(MAX(testdata[scenarioId]) IN _LIST,SUM(testdata[slobVolu])),IF(MAX(testdata[scenarioId]) =MAX('Table'[scenarioId]),SUM(testdata[slobVolu])))

 

vlinyulumsft_1-1715596727115.png

 

4.Here's the final result graph, hopefully it meets your needs:

vlinyulumsft_3-1715596788126.png

vlinyulumsft_5-1715596802847.png

vlinyulumsft_6-1715596834145.png

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-linyulu-msft
Community Support
Community Support

Hi,@mehupbi 

To meet your needs I have created the following visualization object:

vlinyulumsft_0-1715596645750.png

Here is my solution:

1.First, you need to create a virtual table with the following calculation table:

 

Table = VALUES(testdata[scenarioId])

 

2.I made changes to the filtering in order to limit the display to just four:

vlinyulumsft_2-1715596751047.png

3.Finally I created the following metric and replaced it with slobVolu in the visualization object:

 

Measure = 
VAR _LIST = VALUES('Table'[scenarioId])
RETURN
IF(ISFILTERED('Table'[scenarioId]),IF(MAX(testdata[scenarioId]) IN _LIST,SUM(testdata[slobVolu])),IF(MAX(testdata[scenarioId]) =MAX('Table'[scenarioId]),SUM(testdata[slobVolu])))

 

vlinyulumsft_1-1715596727115.png

 

4.Here's the final result graph, hopefully it meets your needs:

vlinyulumsft_3-1715596788126.png

vlinyulumsft_5-1715596802847.png

vlinyulumsft_6-1715596834145.png

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks, If i want to have table visual rather than chart? i mean generate 4 table visuals using same filter. each tabel should render each filter value. if i select 3 values in slicer, i want three table visuals w.r.t filter value selected. i dont have small multiples in table visual

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.