Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Jason_KKA
Contributor II
Contributor II

How to apply limit in bar chart by dimension (and not measure)

Hi experts,

I seek advice for a problem I encountered while developing a bar chart for an app using Qlik Enterprise.

The desired end product I would like to develop is a clustered bar chart for the revenue tracking of the 3 most recent weeks, across different brands. In short,

  • Each bar in the chart is to represent the revenue for 1 week.
  • The bars are grouped by brands.
  • So each brand should have a cluster of 3 bars representing the SAME 3 most recent weeks
  • In the example from the below image, the 3 bars across all brands should start with that of last week (7/2/2022-13/2/2022), followed by a fortnight ago (31/1/2022-6/2/2022) and then the example from the image, the first bar  3 weeks ago (24/1/2022-30/1/2022).
  • Since this week (14/2/2022-20/2/2022) has not ended, this week's bar should not appear.
  • The end-user should not need to use date range picker/filters; the visualization will auto-set the latest 3 weeks relative to current week (with the refreshed measure values) on opening the app with every system-scheduled data reload.Chart in Edit Mode.PNG

Current problem

  • As seen in the image, after I limited the bars within each brand to the Top 3, I noticed that the 3 bars left in each brand are not the top 3 latest fiscal weeks (with top = latest completed fiscal week). After referencing to the data, each brand's 3 bars are by Top 3 weeks in Net Revenue instead.
  • There seems to be no option to change the criteria for limiting to top 3 fiscal weeks as it is fixed to the measure ie. the Net Revenue; see the highlighted blue box in the image.

I thought of using set analysis but understand that it must be coded in an aggregation setting, which seems not applicable in this case, as I feel this seems to be more of a calculated dimension issue.

As I tried to derive a calculated field/dimension, I am also unsure of how to treat/code with the field FiscalWeekName (is it still date-type?), as it is a grouping of dates. The code used in the data load editor for generating the Fiscal Calendar table (and hence the FiscalWeekName) is attached for reference.

Is there any way to go around/change the limiting by measure to dimension values instead? Or how can I create a new dimension which limits the FiscalWeekName to the (relatively) 3 latest weeks?

Pardon me if this is a simple problem, as I am still less than 1 month old into Qlik Sense. Any advice or suggestion will be appreciated and thanks for taking the time to read this long question. 

0 Replies