Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
taylor_jesse
Contributor

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
Honored Contributor

Re: Troubleshoot Expression

Maybe try With this.

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

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

taylor_jesse
Contributor

Re: Troubleshoot Expression

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
Esteemed Contributor III

Re: Troubleshoot Expression

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

taylor_jesse
Contributor

Re: Troubleshoot Expression

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

vishsaggi
Esteemed Contributor III

Re: Troubleshoot Expression

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
Contributor

Re: Troubleshoot Expression

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))"}>}