The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi ,
I want to show a message on the chart that "data is not available" if the bar and line dual axis chart is empty . How can we do it in power bi ?
Thanks
Hi @nish18_1990,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Thank you.
Hi @nish18_1990,
Just checking in to see if you had a chance to follow up on our earlier conversation. If you're still encountering the issue, please share the sample data so we can assist you with an accurate solution.
If you have any further questions, feel free to reach out anytime.
Thank you.
Hi @nish18_1990,
Just checking in to see if you had a chance to follow up on our earlier conversation. If you're still encountering the issue, please share the sample data so we can assist you with an accurate solution.
If you have any further questions, feel free to reach out anytime.
Thank you.
@nish18_1990 Hey,
You can create this measure to get required result
DataCheck = IF(COUNTROWS(YourDataTable) = 0, "Data is not available", "")
Replace YourDataTable with the actual table name you're using in Power BI.
I will add a card in dashboard
Go to the "Visualizations" pane and select the Card visual. Drag the DataCheck measure into the Values field of the Card visual.
I will also use overlay
- Place the card visual over the empty chart space to display the message when the chart is empty.
- Set the card's background transparent if preferred so it lays over the chart when displaying.
Thanks
Harish M
Hi @nish18_1990,
Thank you @Shahid12523 @MasonMA and @MFelix for your response to the query.
Has your issue been resolved?
If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Thank you.
No Data Message =
IF(
ISBLANK(SUM('Table'[Value])),
"Data is not available",
BLANK()
)
Put it in a Card visual, overlay it on the chart, and make the background transparent → shows the message only when chart is empty.
(Alternative: use the measure as the chart title to display the message.)
Hello @nish18_1990
If your chart is simple like one measure, one axis, just summing values,
Message =
IF(
ISBLANK(SUM(Table[Amount])) || SUM(Table[Amount]) = 0,
"Data is not available",
BLANK()
)
If your chart has multiple categories or complex measures (MTD, YTD, ratios, etc.) and you want to detect the case “all points are blank”, replace it with the SUMX/ALLSELECT pattern.
Place a 'Card (new)' visual on report and set up 'Show blank as' to Empty. Remove Title, Label and border of this card visual so that when there's data on Bar chart visual the Card visual looks completely transparent.
When there is no data on Bar chart visual, the Card visual will display the message.
Hope this helps:)
I did tried the calculation but its not working
I am getting only "no" as text . Not sure why. For blank and zero ontime measure i am not getting the text . Ontime measure is count distinct count of id .
When [#OnTime] is blank, the condition [OnTime] = 0 evaluates as TRUE., so both 0 and blank go into the "no" branch and you dont see "no data".
Try adjusting your measure to
Measure =
IF (
ISBLANK ( [#OnTime] ) || [#OnTime] = 0,
"Data is not available",
BLANK()
)
Also please share some sample data to better help other users see if the fix is simply changing the IF logic, or whether you really need the card-overlay trick to handle “empty chart.”
Could you please provide power bi file for reference.
please attach the file as i am not able to access link
The feature of attaching a file directly is only available to Super Users. Mine is saved in google drive and given the global access. you should be able to access.
Hi @nish18_1990 ,
This depends on the setup of your chart and the calculations but you need to create a measure that get the null value with the current context for example:
Warning message =
IF
(SUMX(ALLSELECT(Table[ColumninAxis]), [MeasureinValues]) = Blank(), "Data is not available")
the use this measure on a card or has title on your chart, but if you do the second one don't forget to add the text for the title:
Warning message =
IF
(SUMX(ALLSELECT(Table[ColumninAxis]), [MeasureinValues]) = Blank(), "Data is not available", "This is the Title of the chart")
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Portuguêsmy chart is bar and line chart combo and on x axis i have months and y i have measures one for bar and one for line . Could you please share power bi file for reference.