Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mariamovasheli
New Contributor III

If Get selected

Hello,

I Want to Use Get Selected Function in my chart, So that When I Select YearMonth to see This this Month and previous month.

My Formula looks like Something like this but it doesn't Work. Can you Please help me.

IF(GetselectedCount(YearMonth)>0,


((


AGGR(Sum({<Owner={'NeoGas'}, MonthNum={'$(=max(MonthNum))'}>}Volume),StationName)


/


AGGR(Sum({<MonthNum={'$(=max(MonthNum))'}>}>}Total Volume),District)


)

-

(

AGGR(Sum({<Owner={'NeoGas'}, MonthNum={'$(=max(MonthNum)-1)'}>}Volume),StationName)


/


AGGR(Sum({<MonthNum={'$(=max(MonthNum)-1)'}>}Total Volume),District)

)),



((


AGGR(Sum({<Owner={'NeoGas'}, YearMonthMY = {'>=$(vStartDate)<=$(vEndDate)'}>}Volume),StationName)


/


AGGR(Sum({<YearMonthMY = {'>=$(vStartDate)<=$(vEndDate)'}>}Total Volume),District)


)



-

(

AGGR(Sum({<Owner={'NeoGas'}, YearMonthMY = {'>=$(v2StartDate)<=$(v2EndDate)'}>}Volume),StationName)


/


AGGR(Sum({<YearMonthMY = {'>=$(v2StartDate)<=$(v2EndDate)'}>}Total Volume),District)

)))

1 Reply
MVP
MVP

Re: If Get selected

Would you be able to share a sample to see the issue?