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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
robertsb41
Contributor III
Contributor III

Set Analysis Expression Help

(Sum([ABC_Est_Cost]*[MU_Perc]) + Sum([ABC_Est_Cost]))

This expression works great but I want to only return the sum of this expression when:

([ABC_Est_Cost]*[MU_Perc]) + Sum([ABC_Est_Cost]) is < [Low_Comp_Bid]

Any help is appreciated!

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

try this

count(aggr(if(sum(ABC_Est_Cost*MU_Perc)+sum(ABC_Est_Cost)<sum(Low_Comp_Bid),ABC_Est_Cost),ABC_Est_Cost,MU_Perc))

View solution in original post

17 Replies
robertsb41
Contributor III
Contributor III
Author

count ({<ABC_Est_Cost={"=(ABC_Est_Cost) * (MU_Perc) + (ABC_Est_Cost) < Low_Comp_Bid"}>} ABC_Est_Cost)

This was my best effort but it only works if I replace MU_Perc and ABC_Est_Cost with numbers.  It always returns 0 when I try to use the field names.

Kushal_Chawda

may be this

count ({<ABC_Est_Cost={"=(sum(ABC_Est_Cost) *sum (MU_Perc) )+ sum(ABC_Est_Cost) <sum( Low_Comp_Bid)"}>} ABC_Est_Cost)

robertsb41
Contributor III
Contributor III
Author

That still returns 0.  

This works:

count ({<ABC_Est_Cost={"=(sum(ABC_Est_Cost) * sum(1.01)) + sum(1000) < sum(Low_Comp_Bid)"}>} ABC_Est_Cost)

But as soon as I replace 1.01 with MU_Perc and 1000 with ABC_Est_Cost it returns 0 again.

Kushal_Chawda

Is your fields MU_Perc & ABC_Est_Cost are in number format? Would you be able to share example?

robertsb41
Contributor III
Contributor III
Author

MU_Perc (1-23 values) is a percentage and ABC_Est_Cost is a number.

Kushal_Chawda

Without looking at the data it will be difficult to tell what will be the issue. Is it possible to share sample data?

robertsb41
Contributor III
Contributor III
Author

This is all dummy data so no worries.

robertsb41
Contributor III
Contributor III
Author

Sorry, its the markup analysis sheet and # of jobs won column.  That number should go down as the Markup% goes up.

Kushal_Chawda

Can you tell me what could be the expected output with one example?