Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Rehan
Creator III
Creator III

100% Stacked Bar Chart Issue With Toggle

I am using Qlik Sense and building a Stacked Bar Char showing 100% for every month. I have a Fiscal Month and Calendar Month.

I created a Bar Chart with Month as a Stack and Time Bucket as Bar. It works fine if I use 2 different charts one for Fiscal MOnth and other one for Calendar MOnth both months have their own Time Buckets .(Please see the visual on the right side of the Attachment)

But the requirement was to use a toggle to switch between the 2 months instead of 2 charts. So I used the variable input box setting the fiscal and Calendar Months. Now my Bar chart expressions are ,

Stack

=If('$(vToggle)'='Fiscal',
Fiscal_Month,
If('$(vToggle)'='Calendar',
Calendar_Month))

Bar 

=If('$(vToggle)'='Fiscal',
Fiscal_Time_Bucket,
If('$(vToggle)'='Calendar',
Calendar_Time_Bucket))

Expression

=If('$(vToggle)'='Fiscal',
Sum(Total <Fiscal_Month> Sales),
If('$(vToggle)'='Calendar',
Sum(Total <Calendar_Monthh> Sales)))

But Now I am not getting a 100% Chart . Please see the image on the left of attachment.

Am I missing something here 

 

0 Replies