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
Multiverse_76
Frequent Visitor

Disconnected Table for Slicing Measures

Hi All

I'm trying to slice a Measure but using the disconnected table method.  This formula is working providing there is a selection.  When there is no selection, my visual is blank.  I need it to show all if there's no selection.  Is there a tweak to the formula or a different method that will deliver the desired outcome?

 

New Measure = IF('Combined_Tbl (2)'[Status Number]=SELECTEDVALUE('Value Selection'[Status No]),1,0)

 

Many thanks! 

3 REPLIES 3

This minor change may work as well:

New Measure = IF('Combined_Tbl (2)'[Status Number]=SELECTEDVALUE('Value Selection'[Status No],1),1,0)

The SELECTEDVALUE function has a second optional argument that allows you to define which value should be returned when more than one value is selected.

amitchandak
Super User
Super User

Try Like

 

New Measure = if(isfiltered('Combined_Tbl (2)'[Status Number])
					,IF('Combined_Tbl (2)'[Status Number]=SELECTEDVALUE('Value Selection'[Status No]),1,0)
					0)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Many thanks for the suggestions.  I tried your isfiltered solution @amitchandak but I think it didn't work due to [Status Number] being a measure.  I solved my issue in the end using SWITCH.

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.