Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
I am new to Qliksense and am creating a stacked bar chart.
I have a measure known as Active Policy Count as calculated below:
Active Policy Count=Count({$<EXP_DAT = {">=$(=Date(Today(), 'YYYY-MM-DD'))"}>} POLICY_NUMBER)
I also have a Total Policy Count measure calculated as:
Total Policy Count= Count(POLICY_NUMBER).
I want to create a stacked bar graph so that the active policy count shows as a portion of the total policy count. If I add both measures they get stacked on top of each other and show the sum of active and total which is not what I want.
Can someone please help me with this?
Thanks!
Hi,
You can use two measures which sums up to total policy.
Measure-1 :
Count({$<EXP_DAT = {">=$(=Date(Today(), 'YYYY-MM-DD'))"}>} POLICY_NUMBER) //Active Policy Number
Measure-2:
Count(POLICY_NUMBER) - Count({$<EXP_DAT = {">=$(=Date(Today(), 'YYYY-MM-DD'))"}>} POLICY_NUMBER) //Total - Active Policy Number
When you use those two measures in stacked bar chart, it will sum up to the total policy count.
Alternatively, you can use combo chart, total policy as bar and active policy as marker or line.