Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
yoganantha321
Creator II
Creator II

SET expression required

Hi,

I have a data like as below

 

BudgetA ProjectB ProjectC Project
0.13A
0.26 B
0.33 C
0.49A
0.7 B

I need to display in a text object the sum of Budget of the  Project A and Project B that is 1.58 (excluding Project C)

How to achieve it...


Thanks in advance


Regards,

Yoganantha Prakash G P

18 Replies
pooja_prabhu_n
Creator III
Creator III

What is the error you are getting?

If possible please share the sample app.

Thanks,

Pooja

trdandamudi
Master II
Master II

Please check your total and  it should be 2.68 and not 1.58. The below expression will give you 2.68 which is correct:

=sum( {<[A Project]={">0"}> + < [B Project]={">0"}>} Budget )

snehalameya
Partner - Contributor II
Partner - Contributor II

Hello,

Please try this.

sum( {<[A Project]={'1','2','3'}>}Budget) + sum({<[B Project]={'1','2','3'}>}Budget )


Regards,

Snehal

sasiparupudi1
Master III
Master III

Try

=Sum(If(Len(trim([A Project])),Budget))+Sum(If(Len(trim([B Project])),Budget))-Sum(If(Len(trim([C Project])),Budget))

vishus913
Partner - Creator
Partner - Creator

Hi,

PFA the qvf, maybe this may work

Thanks

Vikas

yoganantha321
Creator II
Creator II
Author

hi Vikas,

I cannot open the file. can you send the same in qvw file format

poojashribanger
Creator II
Creator II

Try this :

Sum({<AProject={"A"}>+<BProject={"B"}>}Budget)

vishus913
Partner - Creator
Partner - Creator

Hi i have no qvw ,

try this expression,

Sum({<[A Project]=p([A Project])>+<[B Project]=p([B Project])>}Budget)

it worked well in the qvf

thanks

regards,

vikas

yoganantha321
Creator II
Creator II
Author

thanks