Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcement: We have made updates to resolve a Page Not Found error. If you still get this error, please let us know in the Community Corner.
Highlighted
Partner
Partner

variable help

Hi Everyone,

I have the foloowing variable..

LET vTargetSum_DistributionChart =

'avg({1<

        [it_target_type]={"Distribution"},

        it_objective_name={'&CHR(36)&'(v_it_objective_name_selections)},

        territory_region={'&CHR(36)&'(v_territory_region_selections)},

       JOIN_territory={'&CHR(36)&'(v_JOIN_territory_selections)}

>}

       [it_target_value]

)';

I want to add in some logic but un sure on how to do it.

basically if the result of the above is NULL then i want to show it as 0.

Can anyone help on how to incorporate this into the above variable please?

Thanks

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: variable help

Try using the alt function:

LET vTargetSum_DistributionChart =

'alt(avg({1<

        [it_target_type]={"Distribution"},

        it_objective_name={'&CHR(36)&'(v_it_objective_name_selections)},

        territory_region={'&CHR(36)&'(v_territory_region_selections)},

       JOIN_territory={'&CHR(36)&'(v_JOIN_territory_selections)}

>}

       [it_target_value]

),0)';


talk is cheap, supply exceeds demand
1 Reply
MVP & Luminary
MVP & Luminary

Re: variable help

Try using the alt function:

LET vTargetSum_DistributionChart =

'alt(avg({1<

        [it_target_type]={"Distribution"},

        it_objective_name={'&CHR(36)&'(v_it_objective_name_selections)},

        territory_region={'&CHR(36)&'(v_territory_region_selections)},

       JOIN_territory={'&CHR(36)&'(v_JOIN_territory_selections)}

>}

       [it_target_value]

),0)';


talk is cheap, supply exceeds demand