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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Trying to have two graphs (Stacked Bar & Matrix) work with a slicer that is created with a grouping

I am sharing my Pbix file here.

I was able to get stacked bar group work with a table that is created with "Selectedcolumns" like below.

 

Slicer (table)

JustinDoh1_0-1632875590120.png

JustinDoh1_1-1632875702998.png

But now, the issue is I need to use the same slicer for Matrix as well, and when I tried using this slicer for Total, it would not display data.

 

OT or DT: showing data:

 

JustinDoh1_3-1632875859213.png

 

Total: Not showing data:

 

JustinDoh1_4-1632875940802.png

 

How do I make it work?

 

Thanks.

 

 

 

 

 

 

 

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

Hi @JustinDoh1 ,

Since you apply the Grouping column in the Slicer table as an option on the slicer, please update the formula of measure [Display Measure] as below: replace VAR _Selection= SELECTEDVALUE ( Slier[Selection] ) with VAR _Selection =SELECTEDVALUE ( Slier[Grouping] ). Later see if the matrix below can display the data when the "Total" option is selected.

Display Measure =
VAR _Selection =SELECTEDVALUE ( Slier[Grouping] )  // SELECTEDVALUE ( Slier[Selection] )
RETURN
SWITCH (
_Selection,
"OT",[OT],
"DT",[DT],
"Total", [Total]
// "Total",[OT] + [DT]
)

yingyinr_0-1633065410290.png

Best Regards

Community Support Team _ Rena
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-yiruan-msft
Community Support
Community Support

Hi @JustinDoh1 ,

Since you apply the Grouping column in the Slicer table as an option on the slicer, please update the formula of measure [Display Measure] as below: replace VAR _Selection= SELECTEDVALUE ( Slier[Selection] ) with VAR _Selection =SELECTEDVALUE ( Slier[Grouping] ). Later see if the matrix below can display the data when the "Total" option is selected.

Display Measure =
VAR _Selection =SELECTEDVALUE ( Slier[Grouping] )  // SELECTEDVALUE ( Slier[Selection] )
RETURN
SWITCH (
_Selection,
"OT",[OT],
"DT",[DT],
"Total", [Total]
// "Total",[OT] + [DT]
)

yingyinr_0-1633065410290.png

Best Regards

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

@v-yiruan-msft Thank you for your help.

It has been a while since I looked into this issue (I went ahead and change to unpivot data as a solution as well), but this is definitely a good resource to use. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.