Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for
Did you mean:
Contributor III

## Condition to show hide based on sequential Month selection

Hi Experts,

I'm facing difficulty to get a solution for my below requirement, Request your expertise here.

Scenario: I have Monthly sales in a bar chart, if the user selects nonsequential order of month then my chart should show an error message.

Ex--> User may select--> Jan, Mar, Nov etc

if user selects sequential order of month then my chart should display the numbers.

Ex--> User may select--> Sep, Oct, Nov

Thanks

Labels (2)

• ### General Question

1 Solution

Accepted Solutions
MVP & Luminary

You may use a condition like:

= (max(Month) - min(Month) + 1) = count(distinct Month)

Of course Month needs to be numeric. If year-swaps should be included you would need to apply the logic on a continuous MonthCounter.

Beside this it might be more user-friendly not to show errors else to show always a continuous row of months - maybe with a set analysis like:

sum({< Month = {">=\$(=min(Month))<=\$(=max(Month))"}>} Value)

4 Replies
Contributor III
Author

Hi

Any inputs from you pls?

Thanks

MVP & Luminary

You may use a condition like:

= (max(Month) - min(Month) + 1) = count(distinct Month)

Of course Month needs to be numeric. If year-swaps should be included you would need to apply the logic on a continuous MonthCounter.

Beside this it might be more user-friendly not to show errors else to show always a continuous row of months - maybe with a set analysis like:

sum({< Month = {">=\$(=min(Month))<=\$(=max(Month))"}>} Value)

Partner - Creator

hi,

in data handling, calculation condition, you can use

num(min(month))+GetSelectedCount(month)-1=num(max(month))

Contributor III
Author

Thanks a lot  @marcus_sommer  & @jmartineze

Tags
Community Browser