Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
apthansh
Creator
Creator

Expression help

I have attached the sample excel and the QVW I am trying to work out...

I need some help with the expression calculation...any help is appreciated...I have my request in QVW.

Thanks much.

10 Replies
m_woolf
Master II
Master II

See the attached qvw. !

md_qlikview
Creator II
Creator II

Hi

Try below Expression

sum(TOTAL [Adj Net Size - SF])-sum(TOTAL {<[Occupying Depts]={'Unallocated'}>}[Adj Net Size - SF])*sum([SF Percentage])

vishsaggi
Champion III
Champion III

Check this?

Sorry use this expr:

= Num((sum(TOTAL [Adj Net Size - SF]) - sum(TOTAL {< [Occupying Depts] = {'Unallocated'} >} [Adj Net Size - SF])) , '###0') * Subfield([SF Percentage], '%',1)

md_qlikview
Creator II
Creator II

Hi,

Try Below expression with Paranthesis

(sum(TOTAL {<[Occupying Depts]={'Unallocated'}>}[Adj Net Size - SF]))*sum([SF Percentage])

apthansh
Creator
Creator
Author

I see that but thats not what I am looking for....you are not removing unallocated from total

manas_bn
Creator
Creator

Adding to the many suggestions:

Add a variable with this expression: This basically calculates (Total SF - Unallocated) and doesn't change with selections.

=sum({1}[Adj Net Size - SF])-Sum({1<[Occupying Depts]={'Unallocated'}>}[Adj Net Size - SF])

variable.PNG

Use the variable in the chart.

=vVar*Num#(subfield([SF Percentage],'%',1))

table.PNG

antoniotiman
Master III
Master III

Hi Ansh,

see Attachment.

Regards,

Antonio.

apthansh
Creator
Creator
Author

Thank you Antonio - But when I put this in Text box or do expression total it goes blank...can you please sujjest ?

antoniotiman
Master III
Master III

In Text Box

=Num(Sum(Aggr(
(Sum(TOTAL [Adj Net Size - SF])-Sum({<[Occupying Depts]={'Unallocated'}>} TOTAL [Adj Net Size - SF]))*
Num(Left([SF Percentage],5)),ParentID,Centers,[Occupying Depts])),'#,##0.00')