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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kahnailee
Advocate I
Advocate I

Persistent Slicer Value Negating Row Context of Same Field

Somewhat straightforward need: using a table and a slicer with disabled interactions between the two, return the value that's filtered within the slicer as a persistent value within the table when using the same field as a row. Essentially, what I need is the following:

 

Slicer - Field Used and Resulting Value
SupplierSupplier C
 
Table Visual
SupplierSlicer Selection
Supplier ASupplier C
Supplier BSupplier C
Supplier CSupplier C
Supplier DSupplier C
Supplier ESupplier C
Supplier FSupplier C

 

So again, I need to utilize the slicer as the value for "Slicer Selection" as a persistent value while also using the same field (Supplier) on the rows. I've tried SELECTEDVALUE but that just returns the row context, hence the same value as the first column. I've tried a mix of ALL and ALLEXCEPT, but the row context kicks back in when coupling that with SELECTEDVALUE to get the slicer selection. I have yet to try a disconnected table, but would that be a viable solution here? Any suggestions? Thanks!

2 REPLIES 2
edhans
Super User
Super User

SELECTEDVALUE() doesn't invoke row context. It looks at a field and if there is one value, returns it, otherwise it returns blank or an alternate result - "Multiple Values Selected" for example.

In your image, is the field in the slicer from a dimension table or from your fact table? Here is what I think you need to do.

 

  1. Create a second slicer from a Dimension table that has the slicer values - or a disconnected table. You can create this using DAX if you want as a Calculated Table that is just VALUES(FactTable[Supplier]) if you don't have a true dim table.
  2. Do not create any relationships with the fact table. It is disconnected.
  3. In your fact table, add a measure that is SELECTEDVALUE(DisconnectedTable[Supplier]) and drop that in the 2nd column

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Using a disconnected table will then require the use of that table as the slicer, which won't work for my case.

Ultimately, what I'm trying to obtain is a why to "mask" the names dynamically based on the selection within a slicer. If the selection is within the row of the table visual, only show that name, otherwise mask it as "Supplier A", "Supplier B", etc. This may not be very straightforward as initially assumed, but I appreciate any guidance you might provide.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors