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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Pri_07_03
Partner - Contributor II
Partner - Contributor II

Bar click selecting wrong data in multi-year mode (calculated dimension)

Hi everyone,

I have a Qlik Sense bar chart where the X-axis changes based on FY selection:

  • No selection
  • Single-year selection
  • Multi-year selection

This part is working correctly.Correct state (before click)  Multi-year selected Chart showing expected barsCorrect state (before click) Multi-year selected Chart showing expected barsWrong behavior (after click)  Show how clicking one bar selects a different bar This is the most important proofWrong behavior (after click) Show how clicking one bar selects a different bar This is the most important proof

Issue:
In multi-year mode, when I click on a bar, the selection jumps to another bar.

Dimension:

If(
GetSelectedCount(選択年度) > 1,
If(
AxisMode='Multi' and Match(AxisType,'Month','Annual'),
AxisSelKey
),
If(
GetSelectedCount(選択年度) = 1,
If(
AxisMode='Single' and Match(AxisType,'Month','Period','Recent3'),
AxisSelKey
),
If(
AxisMode='Single'
and 選択年度 = 実績年度_Axis,
AxisSelKey
)
)
)

Reason (what I think):
I am using a calculated dimension that changes logic based on FY selection.
When I click a bar, Qlik recalculates the dimension and switches logic, so the selected bar changes.

Question:
Has anyone faced this issue?
How can I keep:

  • one bar chart
  • dynamic X-axis
  • and stable bar click selection

Thanks in advance!

Labels (5)
2 Replies
Daniel_Castella
Support
Support

Hi @Pri_07_03 

 

There is something I don't fully understand. When you click on the bar, all the selections change. Is it triggered by an action or is it related on how the tables are linked in the data model? I mean if AxisSelKey is a key field as the name suggest, it could cause troubles using it as dimension.

 

I would suggest to split the calculated dimension in 3 dimensions with different visibility conditions. For example:

Dimension 1: AxisSelKey; Show dimension if: GetSelectedCount(選択年度) > 1 and AxisMode='Multi' and Match(AxisType,'Month','Annual')

Dimension 2: AxisSelKey; Show dimension if: GetSelectedCount(選択年度) = 1 and AxisMode='Single' and Match(AxisType,'Month','Period','Recent3'),

Dimension 3: AxisSelKey; Show dimension if: GetSelectedCount(選択年度) < 1 and AxisMode='Single' and 選択年度 = 実績年度_Axis

 

However, the issue could happen again depending on how the data model is built. Could it be possible for you to share the app or an app with mock data with the same issue?

 

Thank you very much

Daniel

Pri_07_03
Partner - Contributor II
Partner - Contributor II
Author

Hi Dainel 
Thank you for response. 
As I am working for client, I am not able to share the app. 
Could you please check Data model SS?
Data ModelData Model