Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Conditional selection

Hi All,

I created donut chart using below expressions.

Dimension: Status =Availability , Unavailability

Measure: if(Status ='Availability',Only({<Affected_Date={'$(=Max(Affected_Date))'}>}[Overall Availability%]),


My requirement:

Without any selection display only Todays data

If select Month display that month data.

If select Year display that Year data.

I created below code for text box

Ex: =if(GetSelectedCount(Affected_Month)>0,Round(Sum([Overall Availability%])/Count([Overall Availability%]))&''& '%',

Only({<Affected_Date={'$(=Max(Affected_Date))'}>}[Overall Availability%])&''& '%')

How to create same code for donut chart.



Tags (1)
1 Reply
Not applicable

Re: Conditional selection

maybe sthing like;

=if(GetSelectedCount(Affected_Month)=0 and GestSelectedCount(Year)=0,

if(Status ='Availability',Only({<Affected_Date={'$(=Today())'}>}[Overall Availability%]),



if(Status ='Availability',Only([Overall Availability%]),



I mean, if u select a month or a year , u want to show the measure for the selected frame; thus no need to force sthing within the set expression; Qlik will automatically bring the measure for the selected time frame