Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set formula with GetFieldSelections()

Hello,

I would like to do a difference when a criteria is equal to an other field.

I have two field of Date:

Capture.PNG

And when the field "Date" is equal to one of the data in the field "Value Date", this operation have to be done:

=Sum({<AsOf = , [AIR Import Data] = {"=GetFieldSelections(AsOF)"}>} Value_AIR)/1000000

- SUM({$<source = {'Costs_PC'}>}myVal) - SUM( { $< source = {'FTE_Activity'}>}myVal)/

SUM( TOTAL { 1< source = {'FTE_Activity'}, AsOf = {"=$(=GetFieldSelections(AsOf))"} >}myVal)*

SUM( TOTAL { 1< source = {'Allocated_Costs'}, AsOf = {"=$(=GetFieldSelections(AsOf))"} >}myVal)


But this part doen't work:

Sum({<AsOf = , [AIR Import Data] = {"=GetFieldSelections(AsOF)"}>} Value_AIR)/1000000


And i need to precise this parameter because it will sum all the data of Value_AIR for all AsOf.


How can i do that please ?


Thanks you in advance for your help,

Sébastien.

PS: AsOF is the name of the field 'Date' and AIR Import Data is the name of 'Value Date'

17 Replies
sunny_talwar

Can you try this:

Sum({<AsOf = , [AIR Import Data] = p(AsOF)>} Value_AIR)/1000000

trdandamudi
Master II
Master II

May be this:

Sum({<AsOf = ,  [AIR Import Data] = p (AsOF) }>} Value_AIR)/1000000

Anonymous
Not applicable
Author

No it doen't work :/, it returns no values.

Do you have an other idea ? Then we could create a table which can be the intersection of the equal date between theses Field ?

Sébastien.

sunny_talwar

It doesn't because the AsOf you have selected doesn't match either of the two dates available. Is this based on year or month or some kind of range??

Anonymous
Not applicable
Author

It is based on the exact value of the Field 'Value Date'.

I don't see how solve this 😕

Anonymous
Not applicable
Author

No idea please ?

Thank you in advance for your help ,

Sébastien.

sunny_talwar

In the image you show that you selected 31/03/2016, but there is no 31/06/2016 to show in Value Date?

Capture.PNG

Anonymous
Not applicable
Author

Sorry, now the Date 31/03/2016 is present into the fields:

Capture.PNG

And in the expression bellow:

=Sum({<AsOf = >} Value_AIR)/1000000

- SUM({$<source = {'Costs_PC'}>}myVal) - SUM( { $< source = {'FTE_Activity'}>}myVal)/

SUM( TOTAL { 1< source = {'FTE_Activity'}, AsOf = {"=$(=GetFieldSelections(AsOf))"} >}myVal)*

SUM( TOTAL { 1< source = {'Allocated_Costs'}, AsOf = {"=$(=GetFieldSelections(AsOf))"} >}myVal)

==> The field Value_AIR is dependent of the field Value_Date which is named 'AIR Import Data' in the Script

==> The field myVal is dependent of the field Date which is named 'AsOf' in the Script


Sébastien.

Kushal_Chawda

Is there any relation between these dates? If so you can try

Sum({<AsOf = , [AIR Import Data] = {"= [AIR Import Data]=AsOf "}>} Value_AIR)/1000000