Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Gauge chart with conditional expression

Hi guys,

I'm new to QV so please have patience with me.

Got a table with 10 columns, the ones to use now is date, region and quality (in percentage)

For each date there are 6 rows, one for each region.

First I got a linechart that shows the quality per day. Can filter on period and/or region. No problem with this

Then I wan't gauge charts (traffic light) to display the average quality, one chart for each region.

And here is where I get stuck.

I want the gauges to always show the average for each region for the selected period.

I've tried this but doesn't work even though it say's "expression OK"

=Num(avg(Aggr(avg([Quality %]), Only({<region={Helsingborg}>}))),'##,##0%')

This expression works but changes the region by selection

=Num(avg(Aggr(avg([Quality %]), region)),'##,##0%').

Appreciate the help from all you experts

//R

1 Solution

Accepted Solutions
sunny_talwar

Try this

=Num(Avg({<region = {'Helsingborg'}>} Aggr(Avg({<region = {'Helsingborg'}>} [Quality %]), region)), '##,##0%')

View solution in original post

2 Replies
sunny_talwar

Try this

=Num(Avg({<region = {'Helsingborg'}>} Aggr(Avg({<region = {'Helsingborg'}>} [Quality %]), region)), '##,##0%')

Anonymous
Not applicable
Author

Thank you Sunny, it worked perfect