Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
neena123
Partner - Creator
Partner - Creator

Mini Linear Gauge in Table

I am trying to create a mini linear gauge in a table. I would like the gauge to look like a butterfly type image. I am currently trying to show the difference btw YTD and PYTD. IF the difference is positive I would like a green bar showing by how much and if the difference is negative to have a red bar going in the opposite direction. Currently my expression is

=Sum({$<[Year]={$(=Year(today()))},[Status]={'Shipped'}>}[Gross Sales Amount]) - Sum({<[Year]={$=Year(today())-1)},[Status]={'Shipped'}>}[Gross Sales Amount])

My problem is when I switch it to a linear gauge I don't know what to set my max and min to nor how to separate my segments lower bounds. Help?

1 Reply
Not applicable

I did something like this for field with +ve values. Fill to value does work they way you are expecting when you have +ve and -ve values, atleast to the extent of my knowledge. if you are fine to go with Needle it will work.

max and min values you set using aggr, you might have to play with the expression. same goes for min. if you want fixed width bothways, use max expression and multiply by -1.

max(Total

aggr(=Sum({$<[Year]={$(=Year(today()))},[Status]={'Shipped'}>}[Gross Sales Amount]) - Sum({<[Year]={$=Year(today())-1)},[Status]={'Shipped'}>}[Gross Sales Amount]), Your Dimension))

if its not clear, please upload a sample file.