Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculation condition

How do I write a calculation condition that the graph should only be displayed when a city_name is selected.

And can I add a text when there is no graph that the user has to select a city first?

Kind regards,

Katleen

1 Solution

Accepted Solutions
Not applicable
Author

Hi Katleen,

you can use

getselectedcount(city_name)>0

as a calculation condition for the graph, then click the error messages, you can override the standard calculation condition message with your own

hope that helps

Joe

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Hi,

refer the Qlikview example of  "Whats New in Qlikview 11" in Reports tab,

then u can understand easily..

Not applicable
Author

Hi Katleen,

you can use

getselectedcount(city_name)>0

as a calculation condition for the graph, then click the error messages, you can override the standard calculation condition message with your own

hope that helps

Joe

Not applicable
Author

Hi Katleen,

In the Layout tab, select the Show as Conditional -> "if(GetSelectedCount(City_Name)=0,0,1)".

In the general tab, under Error messages, you can add a text when there is no graph.

Thanks

Sabal

SunilChauhan
Champion II
Champion II

in layout  of chart properties

getselectedcount(cityfield)>=1

hope this helps

Sunil Chauhan
Not applicable
Author

You won't be able to do this from the layout, as that means the chart will not show at all, making the error message useless. Need to put it in as a general calc condition not a layout show/hide

edit: sorry I should add, that would work of course but would just need to create a textbox with your text display message then (so a bit more work)

Joe

Not applicable
Author

Agreed

warrentk80
Creator
Creator

To view an object (graph) only if at least one city is selected, you must go to the object properties tab and slide show options enable the functions and conditional type not isnull ([field name city]), thus making the object field is only visible if the city is selected.

I hope to signing helped.

Thank you

Andrea


Not applicable
Author

Sum({$<Measures={$(=only(fieldname))}>} dimension) write this experssion and go to the general tab click on error meesage and click the calculation condition full filled..then type the following sentence(select a city to display the chart).....