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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Mann
Resolver III
Resolver III

Line chart Visual to show custom message when visual level filters return no records

Hi All,

 

I have created a line chart visual where I have used some measures in "Values" section and time period on "Axis". Now when I select the visual and apply some filters on these measures from Visual level filters then sometimes line chart return no records and chart is blanked out.

 

I need to show some custom message when this happens like "No Data returned because of xyz.." Is this possible??

 

Thanks.

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @Mann ,

 

Based my sample data, create measure to determine if show the message, and display the measure in Card visual over your Line chart.

 

Measure = IF(ISBLANK(SUM(Table1[CourseID])),"No Data","")

 

For example, when choose Class3 in Slicer, you can see the message "No Data" showing below picture.

 

5.png

 

 

 

 

 

 

 

 

 

You can download my pbix test file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EUAP3R5S79dBn1OGaZ...

 

Best Regards,

Amy

 

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

Hi @v-xicai  and @parry2k 

 

Thanks for checking on this. I checked the report and link you guys shared. In my case, my filters are not coming from any slicer it is applied on a measure value which is one of the visual level filter. I want visual to show custom message if nothing is returned after selecting this visual level filter.

 

For e.g. In the report you shared if I select the chart name "Score by StudentName" and go to visual filter of "Score" and give some filter condition for e.g. Score is less than 0 then chart blanks out. If this happens then I want that custom message to appear.

 

I agree we can create some measure and use overlapping card on a visual to show the message but what if the visual level filters are applied? Can they somehow interact with the card measure?

 

Thanks.

v-xicai
Community Support
Community Support

Hi @Mann ,

 

You may have a try, and see the returned result.

 

Best Regards,

Amy

parry2k
Super User
Super User

@Mann you can use similar technique described in this blog post.



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.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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