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: 
taylor_jesse
Creator
Creator

Troubleshoot Expression

Hi I have the expression below that I am trying to make it stay constant  no matter what the user selects. I used "1" but the line for the expression still adjusts when the user make a selection.

=sum({1<metric_name={'Billable'}, metric_grouping={'OT'}, $(vset12Months_Modifier)>} metric total)

/ sum($(vset12Months_set) hours_units)

Any suggestions on how to make this expression constant no matter what the user selects.

Thank you

6 Replies
stabben23
Partner - Master
Partner - Master

Maybe try With this.

=sum({1<metric_name={'Billable'}, metric_grouping={'OT'}, $(vset12Months_Modifier)>} metric total)

/ sum({1} $(vset12Months_set) hours_units)

taylor_jesse
Creator
Creator
Author

Thank you for your help. The line for the expression still adjusts based on user selection. The values on the y axis changes as well. I will like this expression to stay the same no matter what.

vishsaggi
Champion III
Champion III

I think its because of the variables. So you want to exclude the values coming from Variable too. Right?

taylor_jesse
Creator
Creator
Author

The variable is for 12 month  period. I will like to include the variable to calculate a 12 month time period.

vishsaggi
Champion III
Champion III

Ok so the Period will change based on your selections so which 12 months you want to make it static, like current 12 months?

taylor_jesse
Creator
Creator
Author

Yes 12 current month. Below is the definition for the variable.

vset12Months_Modifier = MonthYear= MonthYear={">=$(=date(addmonths(max(MonthYear),-11),'MMM-YYYY'))  <=$(=max(MonthYear))"}

vset12Months_Set = {$<MonthYear={">=$(=date(addmonths(max(MonthYear),-11),'MMM-YYYY'))  <=$(=max(MonthYear))"}>}