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

Qlikview setanalysis without using aggregation function

Hi,

I dont want to consider month selection while using chart and does not require to use aggregation at caluclation.

I have written following setanalysis caluclation

=If(Aggr='R',only({<Month=>}($(vMed))),only({<Month=>}($(vMed))))

This is working fine and all results are coming correct.

however i have written an experssion at dimension level to show back ground colour and text colour in bold format, this is not working after using Month in setanalysis.

Can you guys throw some insight on this ?

Regards,

4 Replies
Gysbert_Wassenaar

=If(Aggr='R',

     only({<Month=>}($(vMed))),

     only({<Month=>}($(vMed)))

)

Both branches of your if statement are the same. And both branches have a closing parenthesis without a matching opening one. Your expression cannot work (unless your variable vMed contains an opening parenthesis).

I don't understand your problem. Perhaps you can post a small qlikview document that illustrates the problem.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

Thanks for your reply.

Sorry did not mention formula correctly

Now the correct one is

=If(Aggr='R',

     only({<Month=>}($(vMed))),

     only({<Month=>}($(vMedia)))

)

and this is working.

The only reason is we are getting data from excel and it has already calulcations done and iam showing that data in chart without any aggregation using setanalysis.

The chart shouldnot change when specific month selection is done,It need to display the chart for whole year.

With this formulae its working fine however the bold format for dimension and back ground is not working due to "only" in caluclation level.

At the dimension level i have wrriten following for back ground colour

If(match(format,'H','B'),rgb(210,210,210)) and

text format

If(match(format,'H','B'),'<B>')

The earlier formulae where its working for back ground and text format is

=IF(AGGR='R',($(vMedida)),($(vMedida_SinRollup))) however its showing chart for specific month selection and we want to exclude month and show whole year without effecting month selection


If(Aggr='R',

     only({<Month=>}($(vMed))),

     only({<Month=>}($(vMedia)))

)



Regards,

Ram

Gysbert_Wassenaar

Try replacing Aggr with only({<Month=>}Aggr)


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

It didn't work.

I made a slight modification to the dimension related to  back ground and bold

=only({<Month=>}if(Match(FORMAT,'H','B'),rgb(210,210,210)))

=only({<Month=>}if(Match(FORMAT,'H','B'),'<B>'))

This worked.

Thanks a lot for your help.

Regards,

Ram