cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
naoki
Helper I
Helper I

Show as blank based on selection

Hi, 

I would like to show numbers as blanks when a selection from a slicer is selected. 


When I select buy, I don't need to see target. Similarly for certain country selection, I don't need to see target for all country only selected country even though there are targets set for them those countries target do not matter to me at this level. If either one or both options are selected, when I mouse over, target should be blank. Below is my DAX, it is now showing either selection as (blank). 

 

 

Target = IF(ISFILTERED ('Table'[Sell/buy]),
IF(SELECTEDVALUE('Table'[Sell/buy]) = "buy", BLANK()),
CALCULATE([Target],USERELATIONSHIP(table'[Country],'Table'[Country])))

Capture.JPG

 

1 ACCEPTED SOLUTION

@v-yuta-msft 

 

I managed to find the solution to hide based on 2 slicers, it is now showing blanks if I select either one or both choices. 

 

Target = IF(ISFILTERED ('Table'[Col]),
IF(SELECTEDVALUE('Table'[Col])="Sell",  
IF(ISFILTERED ('Table'[Col]),
IF(SELECTEDVALUE('Table'[Col])="{CountryA, Country B}",  
CALCULATE([Target],USERELATIONSHIP('Table1'[Col],'Table2'[Col])),
BLANK()))

View solution in original post

3 REPLIES 3
naoki
Helper I
Helper I

Update 1: 

 

I managed to get the target to not show for the first selection of buy/sell, however I am unable to get the target to hide for the country selection. 

 

Below is my DAX, how should I edit it to allow 2 selections? From two different tables 

Target = IF(ISFILTERED ('Table'[Col]),
IF(SELECTEDVALUE('Table'[Col])="Sell",  
CALCULATE([Target],USERELATIONSHIP('Table1'[Col],'Table2'[Col])),
BLANK()))

Note: All data is edited and I am unable to share my PBIX file, as my data is confidential. However, I will still try to provide as much information possible. 

@naoki ,

 

Have you dragged some to target field? If you have, the target value will be shown in the Gauge chart and can't be controlled by slicer.

Capture.PNG 

 

Community Support Team _ Jimmy Tao

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

@v-yuta-msft 

 

I managed to find the solution to hide based on 2 slicers, it is now showing blanks if I select either one or both choices. 

 

Target = IF(ISFILTERED ('Table'[Col]),
IF(SELECTEDVALUE('Table'[Col])="Sell",  
IF(ISFILTERED ('Table'[Col]),
IF(SELECTEDVALUE('Table'[Col])="{CountryA, Country B}",  
CALCULATE([Target],USERELATIONSHIP('Table1'[Col],'Table2'[Col])),
BLANK()))

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors