Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Conditional Show

Hi All

I created a chart and activated expression conditional show to switch between YTD and MTD. However when I now select a single record the chart give me a result of 0 even if there is a value.

What’s causing this and how can I fix it?

1 Solution

Accepted Solutions
udaya_kumar
Specialist
Specialist

8 Replies
Anonymous
Not applicable
Author

Hi Tumelo,

I see that you have used a variable. I would suggest that you set the value of the variable in your script as 1 or some other number. Then, in the conditional statement, set the variable to 0. Also set the charts associated with the condition value.

I hope this helps

NareshGuntur
Partner - Specialist
Partner - Specialist

The dashboard is showing correct data.

I just have selected Budget Month as 'Jan - Feb' where YTD amount is 0.

and I see no Amount in the below table.

When you clear the selections, even the top chart shows data other than 0s. Please scroll down.

Cheers,

Naresh

jagan
Partner - Champion III
Partner - Champion III

HI,

The variable declaration is causing the issue

vTransMaxMonth=MaxString({<Amount={">0"}, Year={'$(vMaxYear)'}>}BudgetMonth)

Try this expression

=MaxString({<Amount={">0"}, Year={'$(vMaxYear)'}> + <BudgetAmount={">0"}, Year={'$(vMaxYear)'}>}BudgetMonth)

Regards,

Jagan.

udaya_kumar
Specialist
Specialist

Check this file

Not applicable
Author

Hi Uday

This is exactly what I want, how did you get this to work correctly?

Not applicable
Author

Hi guys

Thanks for all your replies. Uday posted an app with the correct result but I still don't understand what he did differently...

Not applicable
Author

Oooh....got it! Never mind Thanks

jagan
Partner - Champion III
Partner - Champion III

Did you checked for MTD & Category = Airtime?  The same issue displaying zeros.

Did you tried this

vTransMaxMonth=MaxString({<Amount={">0"}, Year={'$(vMaxYear)'}> + <BudgetAmount={">0"}, Year={'$(vMaxYear)'}>}BudgetMonth)

Please find attached file.

Regards,

jagan.