Hi
Veljko,
@Robert Dostal is right about conditional block.
You need to create a
Dummy calculation in your queries, it will use the following expression:
count([Any column from your queries])Drag your visualization into conditional block. One conditional block for each visualization.
Add a boolean block variable in each conditional block.
The report expression for the variable will be:
[Query1].[Dummy] is not null
For another visualization, it would be [Query2].[Dummy] is not null
The structure should look like:
Drag your visualization in the varData = Yes. If you have multiple queries, you will need to create varData2, varData3 and so on.
On each varData (and 2, 3,...) = No, be sure to change the following parameters:
In Box, Box type = None
In Positionning, Visible = No
If you have a list or crosstab container, be sure to update the following (located in General)
Best regards,
------------------------------
Patrick Neveu
Positive Thinking Company
------------------------------
Original Message:
Sent: Thu February 17, 2022 09:01 AM
From: Robert Dostal
Subject: How to hide chart when there is no data available
Hi Veljko,
can it be that the cart is not really empty though? What kind of values and of which aggregation rule do you use in the chart? Have you applied (zero-)suppression on the chart?
Keep in mind that e.g. count (distinct xxx) returns a 0 when theres no hit in the data. Then this 0 is data for the chart and therefore it will be displayed. Just my thought which might be the case here.
Nevertheless you can still use the variable as a solution. There's an object called "conditional block" where you can define this variable to used by the block. The block will then have one block content for No and another for Yes. "Yes" gets the chart and "No" gets nothin.
------------------------------
Robert Dostal
Team Leader BI
GEMÜ
Ingelfingen
Original Message:
Sent: Thu February 17, 2022 08:41 AM
From: Veljko
Subject: How to hide chart when there is no data available
Hi Robert,
Thank you for your replay. I am using chart, and Yes, I have already set the setting for "No data contents" to "No content" but it still shows empty chart.
------------------------------
Veljko
Original Message:
Sent: Thu February 17, 2022 07:58 AM
From: Robert Dostal
Subject: How to hide chart when there is no data available
Hi Veljko,
do you use a visualization or a chart?
If it's a chart you can set the setting for "No data contents" to "No content"
If it's a visualization I recommend creating a Boolean variable which returns Yes/No based on the measure you use. Then set this variable for your vis and select that it should only be rendered when the result of the variable is "Yes".
------------------------------
Robert Dostal
Team Leader BI
GEMÜ
Ingelfingen
Original Message:
Sent: Thu February 17, 2022 07:04 AM
From: Veljko
Subject: How to hide chart when there is no data available
How to hide charts on the page when there is no available data. Using count distinct measure, and having no data content set to yes still returns empty charts.
------------------------------
Veljko
------------------------------
#CognosAnalyticswithWatson