Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have created a chart that will display the total count of different products in for this year. The question that I have how can I create a chart that will only display the total amount of products when the month and year is selected. If the month or year isn't selected, I don't want the charat to show anything.
Thank you in advance!
You can use GetSelectedCount(FieldName) to tell you how many items are selected in a particular field. Then on your chart, set the Conditional Show to require that this value is greater than zero for each field you want to use. Something like:
(GetSelectedCount(Month) > 0 And GetSelectedCount(Year) > 0)
If you still want to show the chart, but have it be empty, then you can use something like the code above on all your expressions.
If(GetSelectedCount(Month) > 0 And GetSelectedCount(Year) > 0, Expression, Null)
Then if you have Suppress Missing checked, you'll only see data if something is selected for Month and Year.
You can use GetSelectedCount(FieldName) to tell you how many items are selected in a particular field. Then on your chart, set the Conditional Show to require that this value is greater than zero for each field you want to use. Something like:
(GetSelectedCount(Month) > 0 And GetSelectedCount(Year) > 0)
If you still want to show the chart, but have it be empty, then you can use something like the code above on all your expressions.
If(GetSelectedCount(Month) > 0 And GetSelectedCount(Year) > 0, Expression, Null)
Then if you have Suppress Missing checked, you'll only see data if something is selected for Month and Year.
And to add one more to NMiller's suggestion, if I may...
To keep the chart as placeholder, not hiding it completely, you can use the same condition in Calculating Condition instead of Show Condition. If it is not met, there will be the blank chart placeholder with the default message "Calculated condition unfulfilled". But you can customize it as well, to something like "Please select year and month"
can u tell me how to do the same in the qliksense?