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

Blank value should be displayed irrespective any selection in the slicer.

Hi All,

 

I have an requirement where we have to Display blank value irrespective of any slicer selection.

 

For eg:

 

NameSeasonCropMeasure
DakshuSummer1
ViyanWinter3
Kanna  

Slicer is season which contains summer,winter and blank, Whereas if I select Summer I need the result set as mentioned below

NameSeasonCropMeasure
DakshuSummer1
Kanna  

If I select Winter then the result should dispaly as mentioned below.

 

NameSeasonCropMeasure
ViyanWinter3
Kanna  

 

Is this possible,If yes please let me know.

 

Thanks

Vannikannan.k

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

Hi @Vannikuthalam ,

 

We can create a table that only contains season and a measure to replace name to meet your requirement.

 

1. Use DISTINCT function to create a calculate table, there is no relationship between two tables.

 

Table 2 = DISTINCT('Table'[Season])

 

Blank1.jpg

 

2. Then we can create a measure.

 

Measure = 
var selected_ = SELECTEDVALUE('Table 2'[Season])
var x = CALCULATE(MAX('Table'[Name]),FILTER('Table','Table'[Season]=BLANK()))
var y = CALCULATE(MAX('Table'[Name]),FILTER('Table','Table'[Season]=selected_||'Table'[Season]=BLANK()))
var z = IF(ISBLANK(selected_),x,y)
return
IF(HASONEFILTER('Table 2'[Season]),z,CALCULATE(MAX('Table'[Name])))

 

3. At last we create a slicer using Table 2[season] and the result like this,

 

blank4.jpg

 

blank3.jpg

 

blank2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

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

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

Hi @Vannikuthalam ,

 

We can create a table that only contains season and a measure to replace name to meet your requirement.

 

1. Use DISTINCT function to create a calculate table, there is no relationship between two tables.

 

Table 2 = DISTINCT('Table'[Season])

 

Blank1.jpg

 

2. Then we can create a measure.

 

Measure = 
var selected_ = SELECTEDVALUE('Table 2'[Season])
var x = CALCULATE(MAX('Table'[Name]),FILTER('Table','Table'[Season]=BLANK()))
var y = CALCULATE(MAX('Table'[Name]),FILTER('Table','Table'[Season]=selected_||'Table'[Season]=BLANK()))
var z = IF(ISBLANK(selected_),x,y)
return
IF(HASONEFILTER('Table 2'[Season]),z,CALCULATE(MAX('Table'[Name])))

 

3. At last we create a slicer using Table 2[season] and the result like this,

 

blank4.jpg

 

blank3.jpg

 

blank2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

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

parry2k
Super User
Super User

@Vannikuthalam you have a to create a separate table for slicer which is not linked to your data table and then use that table in the measure to filter selected season and blank season



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

amitchandak
Super User
Super User

@Vannikuthalam , Try a measure with +0

 

Or this option in Visual

Shareapps.png

 

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.