Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
prear
Frequent Visitor

How to show a message when overall count is less than 30

The requirement is to not to show a chart when the overall sum of stacked bar is less than 30. It should be showing a message like no data available. For example, rather than the two bars, it should show a message as the next image containing 'No Data'. Would appreciate any help. Thanks

 

prear_0-1684920216146.png

prear_1-1684920253432.png

 

 

2 REPLIES 2
prear
Frequent Visitor

Thanks for your response @v-rongtiep-msft , I have tried this solution but it doesn’t seem to work.

I have a column ‘Happy’ with values Yes, No, No Data, Prefer not to share. There’s another column called Feedback with values Yes, No. I can't seem to attach PBIX file and unfortunately don't have permissions to share links. I have added all the pictures here. I need the charts to disappear when the total number values of values of Happy column is  less than 30 ie Anytime a filter is selected/not selected if the sum of ( No + Yes + No Data + Prefer not to share) < 30, then the chart shouldn’t show bar chart but a status “No Data”. In the below picture I have selected K in county filter and the sum of the values 4 + 1+ 2 < 30 so need the chart to disappear. Please could you help. 

 

My data looks like this:

prear_1-1685460506885.png

 This is one sample visual as I have 10 similar visual in my dashboard where the Happy Legend remains the same.

 

prear_2-1685460606602.png

 

prear_0-1685460104101.png

 

v-rongtiep-msft
Community Support
Community Support

There @prear ,

You can't just type "no data" so that the data type contains both text and numbers, so you can try to output blank if the total value is less than 30.

 

measure=var _1=sumx(all(table,table[value])
return
if(_<=30,blank(),max(table[value]))

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.