Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis in text object

Hi

i need to show the sum of the amount for the selected period which are positive group by branches in text object.

For Ex, I have the data like

Month     Branch     Amt

Jan      A               10

Feb     A               -20

Mar     A               20

Jan      B               -10

Feb     B               20

Mar     B               40

    I need to show in text object, the value for the selected period jan is sum(Amt)= 10.(only A is having Positive values)

for feb, sum(amt) is 10 (bcoz only B is having sum(amt) as positive)

for Jan,Feb is 10 (bcoz only B is having sum(amt) is positive A is givining neg value(-10) dont consider)

for jan,feb,mar is 60 bcoz sum(amt) for A (10)and B (50) is Positive.

Hope someone can help me out,

thanks in advance.

5 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try this

     Sum(Aggr(If([Amt]>=0,[Amt]),[Amt]))

Hope it helps

Celambarasan

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try this

     Sum(Aggr(If(Sum(Amt)>=0,Sum(Amt)),Month,Branch,Amt))

Hope it helps

Celambarasan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

=Sum(Aggr(If(Sum(Amt) > 0, Sum(Amt)),Branch, Month))

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi

thanks for reply...

But its not working...

could anyone help me....

thanks in advance....

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

     Try this expression in text box.

     =sum({<Branch = {'=sum(Amt)>0'}>}Amt)

Regards,

Kaushik Solanki   

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!