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: 
milindnikumbh
Creator
Creator

List box multiple selection and variable not working

Dear Experts ,

Greetings !

Attached is the my document. Its working fine when I select the single Fiscal Year . But when I select multiple fiscal years, my last graph is not displaying the data. All variables are populating data correctly in text item. But not able to use in expression.

You suggestions / help is highly appreciated.

Thanks.

Regards,

Milind.

17 Replies
YoussefBelloum
Champion
Champion

Hi,

it is not populating correctly because of the SubField function Subfield(Fyr,', ',1).

t takes only the first fiscal year if yo select 2

why do you use this condition actually ?

mdmukramali
Specialist III
Specialist III

Hi Milind,

i look at your expression which you are using in the chart.

i didn't found any field or variable with the name CLY .

from where you are using CLY ?

Listbox.PNG

woshua5550
Creator III
Creator III

Hi ,it's a group name

isorinrusu
Partner - Creator III
Partner - Creator III

Try this in your expression:

=Round ( if(getcurrentfield(CLY)='PRODT', sum({<FiscalYear={"$(=Subfield(Fyr,', ',1))"}>}[PRODUCTION TONS]) ,

      if(getcurrentfield(CLY)='PRODQ', sum({<FiscalYear={"$(=Subfield(Fyr,', ',1))"}>}[PRODUCTIN(A+B)]) ,

           if(getcurrentfield(CLY)='SCRAPT', sum({<FiscalYear={"$(=Subfield(Fyr,', ',1))"}>}[Scrap Tonnage]) ,

               if(getcurrentfield(CLY)='SCRAPQ', sum({<FiscalYear={"$(=Subfield(Fyr,', ',1))"}>}[Scrap Qty]) ,

                       if(getcurrentfield(CLY)='SCRAPP', ( sum({<FiscalYear={"$(=Subfield(Fyr,', ',1))"}>}[Scrap Tonnage]) / sum({<FiscalYear={"$(=Subfield(Fyr,', ',1))"}>}[PRODUCTION TONS]) ) * 100

               )

               )

               )

               )

               )

        )

woshua5550
Creator III
Creator III

if user selected '2013-2014' & '2014-2015' , what data do you want to show ? '2013-2015' ?

milindnikumbh
Creator
Creator
Author

Then it will show all quarters of 2013-2014 in one chart and I will deploy same chart for 2014-2015 .

milindnikumbh
Creator
Creator
Author

Its not working.

milindnikumbh
Creator
Creator
Author

I need to show bar chart per year. ( all quarters in one graph ).

milindnikumbh
Creator
Creator
Author

this is giving error :

=Round ( if(getcurrentfield(CLY)='PRODT', sum({<FiscalYear={"$(=Subfield(Fyr,', ',1))"}>}[PRODUCTION TONS]) ))