Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm wondering how i can make my charts empty if I haven't made any selections?
As it is right now it shows total sales of all years I have data for instead of nothing.
And if possible I'd want the empty chart to say "please select a year" or something to that effect.
Thanks
In general tab add a calculation condition.
Example
If (getselectedcount (year) >0,1,0)
This means the chart will evaluate only if a value in year field is selected
In general tab add a calculation condition.
Example
If (getselectedcount (year) >0,1,0)
This means the chart will evaluate only if a value in year field is selected
See this thread
https://community.qlik.com/thread/158159
Go to Chart Properties
Layout tab
Tick Conditional Show
Write Condition as below
GetSelectedCount(Year)>0
This will make your chart hidden if there is no Year selected.
But if you don't want like this.. another way is
go to General Tab
write below condition in Calculation Condition
GetSelectedCount(InvoiceYear)>0
Now in the same tab, click on Error Messages
Select Calculation Condition unfulfilled from Standard Messages
Write below in customer message
Select at least one year..
Apply OK
Hi Manish!
I tried your expression: GetSelectedCount(InvoiceYear)>0 but it didn't work. I tried changing InvoiceYear to my variable(?) (which is Sales) but it still didn't work. Just shows the pie chart that it always does
Hi Vineeth!
I tried your solution as well, but with the same result as I posted below (doesn't work).
In this case however, it doesnt show anything when I do select a year - so the chart always show "Please select a year".
I read the thread you linked, but I didn't manage to take anything useful away from it..
Any ideas on how to solve my problem?
A bit more specific: I have a pie-chart/bar-chart that displays how much of the sales come from various countries around the world using Sales expression.
Can you post your expression, that you entered in calculation condition
I used the expression posted by you: If (getselectedcount (year) >0,1,0)
And did you replace year with your actual Year fieldname in your app?
I did not, my fieldname for year is Year, assumed it would work the same but apparently not.
But now it does (with the capital Y in Year)!
Thank you a lot for your help!