Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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!
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.
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.
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |