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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with Trellis Gauge chart

Hi,

I am trying to have 2 trellis gauge charts to show last years figures(on the 1 gauge) compared to this years(on the other gauge).

The problem is it shows both gauges but only one gauge has an indicator. Please find my code below:

=Sum({$<Fiscal_Year1={$(=Only(Fiscal_Year1))}>}PO_Spend)/
Sum({$<Fiscal_Year1={$(=Only(Fiscal_Year1))}>}Total_Spend)

=Sum({$<Fiscal_Year1={$(=Only(Fiscal_Year1)-1)}>}PO_Spend)/
Sum({$<Fiscal_Year1={$(=Only(Fiscal_Year1)-1)}>}Total_Spend)

Regards,

Nhlanhla

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Nhlanhla,

If you calculate previous to selected period you should use {1} instead of {$} as previous period might be out of current selection. So in your case right expression for second gauge should be:

=Sum({1<Fiscal_Year1={$(=Only(Fiscal_Year1)-1)}>}PO_Spend)/

Sum({1<Fiscal_Year1={$(=Only(Fiscal_Year1)-1)}>}Total_Spend)

View solution in original post

4 Replies
Not applicable
Author

Hi Nhlanhla,

if i understand ur problem and if u want to use trellis, u have to use only 1 expression and use "Fiscal_Year1" as trellis dimension.

Look at my example.

C u ,

Stefano.

Not applicable
Author

Nhlanhla,

If you calculate previous to selected period you should use {1} instead of {$} as previous period might be out of current selection. So in your case right expression for second gauge should be:

=Sum({1<Fiscal_Year1={$(=Only(Fiscal_Year1)-1)}>}PO_Spend)/

Sum({1<Fiscal_Year1={$(=Only(Fiscal_Year1)-1)}>}Total_Spend)

Not applicable
Author

Hi,

tray this,

let me know.

Not applicable
Author

Thanks guys it works...Much Appreciated