Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I have an requirement where we have to Display blank value irrespective of any slicer selection.
For eg:
Name | Season | CropMeasure |
Dakshu | Summer | 1 |
Viyan | Winter | 3 |
Kanna |
Slicer is season which contains summer,winter and blank, Whereas if I select Summer I need the result set as mentioned below
Name | Season | CropMeasure |
Dakshu | Summer | 1 |
Kanna |
If I select Winter then the result should dispaly as mentioned below.
Name | Season | CropMeasure |
Viyan | Winter | 3 |
Kanna |
Is this possible,If yes please let me know.
Thanks
Vannikannan.k
Solved! Go to Solution.
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])
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,
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.
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])
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,
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.
@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.
@Vannikuthalam , Try a measure with +0
Or this option in Visual
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |