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

Expression in chart

Hi,

For the expression in my chart I use a variable:

=$(=vCalcYTDYear1)

This variable includes the following formula:

sum({$<FYear = {$(vChooseYear1)}, OrderPhase_Desc = {$(vOrderPhaseDesc)}>}NettAmount$(vCurrency))

As dimension in my chart I use a cyclic group which has got three fields: SoldToBusinessPartner, Product, CCCode. I would like to see the sum per dimension of my cyclic group only if the sum is larger then 0. Could anybody help me to adjust my formula or better implement it so that I can proceed to use the variable? I would like to do this as I already use a dimension limit for that formula that reduces data to X% relative to the total along the first values in sort order but for some reason Qlik View still keeps negative values which should not be included.

Best regards,

Carolin

1 Solution

Accepted Solutions
its_anandrjs

Hi,

You mean to say that Sum of NettAmount if sum is larger then 0 if then put expression like this

if(sum({$<FYear = {$(vChooseYear1)}, OrderPhase_Desc = {$(vOrderPhaseDesc)}>}NettAmount$(vCurrency)) > 0,

   sum({$<FYear = {$(vChooseYear1)}, OrderPhase_Desc = {$(vOrderPhaseDesc)}>}NettAmount$(vCurrency)) , 0 )



Hope this helps

Thanks & Regards

View solution in original post

2 Replies
its_anandrjs

Hi,

You mean to say that Sum of NettAmount if sum is larger then 0 if then put expression like this

if(sum({$<FYear = {$(vChooseYear1)}, OrderPhase_Desc = {$(vOrderPhaseDesc)}>}NettAmount$(vCurrency)) > 0,

   sum({$<FYear = {$(vChooseYear1)}, OrderPhase_Desc = {$(vOrderPhaseDesc)}>}NettAmount$(vCurrency)) , 0 )



Hope this helps

Thanks & Regards

carolin01
Luminary Alumni
Luminary Alumni
Author


Hi,

Perfect, thank you - if I see that then it´s easy to understand but still hard for me to have the correct idea by myself .

Best regards,

Carolin