# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Partner

## Row Count = 0 when Chart is Empty?

Hi Members,

This attached Straight Table is having Conditional Dimensions and Expressions. (NULLs and Zeros are suppressed/hidden)

Now, based on some calculated conditions , my chart looks like this in some scenario . It will populate data when the condition matches in other scenarios. (Both are working fine.)

However, is there any function to get the Row Count of the Chart ( 0 in above view). I want to put up a Error Message/ Pop Up for the Users , when the Row Count = 0.

Any help will be useful.

Regards!

Labels (3)

8 Replies
Partner

## Re: Row Count = 0 when Chart is Empty?

in Calculated Condition for Error Message, I am trying to put expressions like Sum (Ship Qty) > 0 or Count (any dimension) > 0 etc, but that is calculating for the whole data set and not for the Chart level.
So that's not working too.
MVP & Luminary

## Re: Row Count = 0 when Chart is Empty?

You could try it with the following logic:

count({< AnyAppliedConditions >} distinct Dim1&Dim2&Dim3)

whereby the dims here are placeholder for the dimensions in your table and if any conditions are applied within the measures you will need to apply them here, too.

- Marcus

Partner

## Re: Row Count = 0 when Chart is Empty?

Thank you for response.

In my Chart, I have nearly 50 Dimensions and Expressions that are conditional too. That's why I am bit skeptical using them in the formula like this.  🙂

What Set Analysis is this - {< AnyAppliedConditions >} ? Any example please.

Partner

## Re: Row Count = 0 when Chart is Empty?

I tried keeping the all the Dimensions in a Field and using that in a Variable, like this -

vFieldList = Concat (DimensionField, '&')

Then using it is Count, like this -

Count (DISTINCT \$(vFieldList )).

Still for the empty chart (what is posted in image), shows a 'value' and NOT ZERO. May be its assuming the Chart has data which are suppressed because of Null or Zero or any other conditions.

Any other magic on top of this?

Regards!

MVP & Luminary

## Re: Row Count = 0 when Chart is Empty?

{< AnyAppliedConditions >} means that if a measure in your chart has a condition like: {< Flag = {1} >} you will need to include it within the dimension-value counting, too because otherwise they wouldn't do count on the same dataset.

In general if your chart contained multiple dimensions and (complex) measures with visibility-conditions you will need to fetch them all if you want to do an overall summarizing. This sounds quite complex and troublesome and maybe it is but if you creates such a sophisticated object ...

... maybe it isn't in reality so difficult. I assume that there fields with which the visibility of the dimensions/measures are controlled and this could be used for such a counting, too. Maybe in this way:

count(distinct \$(= '[' & concat(DimensionsField, ']&[') & ']')

- Marcus

Partner

## Re: Row Count = 0 when Chart is Empty?

Hi @marcus_sommer,

Yours above expression and the approach I did (storing them in variable first) - giving the same results.
Generating some number. But Not Zero, if the chart is empty or correct Row Count.
MVP & Luminary

## Re: Row Count = 0 when Chart is Empty?

There might be some additionally logic in regard to your conditions needed.

Beside of this I think there are data available because an object without any data wouldn't be displayed and for such a case is an own message of the object - 'no data available' - therefore there must be something ...

- Marcus

Highlighted
Partner

## Re: Row Count = 0 when Chart is Empty?

@marcus_sommer,

Yeah, trying to put the other Set Analysis and check.

Yeah agree that Chart has some data and its not visible because of some expression conditions or NULLs/Zeros Suppressed.
If it is 'really' totally blank, then it has its own error message - 'No Data Available' .