Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dolly777
Contributor III
Contributor III

How to write expression for following requirement?

Hi All,

I have following inline table every value is a dimension  in another table?

TableRevenueInline:

Load * inline

[

COL

PAS P1@Net List USD

PAS P1@Net Amount 

PAS P1@Net Contra 

];

in a pivot table   I am using 'COL' as dimension

and in expression I have find out

sum (PAS P1@Net List USD) if value is COL='PAS P1@Net List USD'

sum(PAS P1@Net Amount) if COL= 'PAS P1@Net Amount'

sum(PAS P1@Net Contra) if COL = PAS P1@Net Contra


Please help me to write the expression to get the accurate value

6 Replies
tresesco
MVP
MVP

Basic syntax of IF statement is like :

If ( <condition>, <execute when TRUE>, <execute when FALSE>)


Hence, you may try like:

If( COL='PAS P1@Net List USD', sum (PAS P1@Net List USD) ,

     If( COL= 'PAS P1@Net Amount'sum(PAS P1@Net Amount),

          If( COL = 'PAS P1@Net Contra',  sum(PAS P1@Net Contra) )))

hari8088
Creator
Creator

Hi,

As i see if your doing some aggregation function it should be numeric value but as per your requirement it seems your summing strings

elaborate the requirement it  means is there any data linked to NEt list usd ,Netamount &Netcontra.

shraddha_g
Partner - Master III
Partner - Master III

pick(wildmatch(COL,'PAS P1@Net List USD','PAS P1@Net Amount','PAS P1@Net Contra'),

sum (PAS P1@Net List USD),

sum(PAS P1@Net Amount),

sum(PAS P1@Net Contra)

)

jonathandienst
Partner - Champion III
Partner - Champion III

You could try the dynamic expression:

=Sum([$(=COL)])

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
dolly777
Contributor III
Contributor III
Author

Thanks .. I tried this way and got the approximate value but not exact value

shraddha_g
Partner - Master III
Partner - Master III

can you share expected output n what you are getting with this code?