Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Amit_B
Creator
Creator

Set analysis by selected values

Hi,

I have 2 tables that are not connected but have similar values. For example in the first table there is a 'year' field and in the second table there is a 'byyear' field. How can I make calculations on the second table according to selections of the values ​​in the first table?

Something like that: (I know the formula is wrong, it's just for example)

sum({<byyear={getselectedvalue(year)}>}amount)

Thanks!

Labels (5)
6 Replies
Anil_Babu_Samineni

@Amit_B Will you be able to change field name from second table with first table like

Load byyear as Year, .....

So that, Year field is common for both table and you can use with Sum(Amount)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Antoine04
Partner - Creator III
Partner - Creator III

Hello,

You need to use the P() function.

Like this :

Antoine04_0-1707989218385.png

 

Does it fit you expectation ?

Best Regards,

Antoine L

Aditya_Chitale
Specialist
Specialist

Try this: 

=sum({<byyear={$(=GetFieldSelections(year))}>}amount)

 

Regards,

Aditya

Amit_B
Creator
Creator
Author

I select values in 'year' field and need the 'byyear' field to be updated, so I wrote it like this:

sum({<byyear=P(year)>}amount

When I check it with filter panes it works, but in the kpi (set analysis formula) I get 0.

Antoine04
Partner - Creator III
Partner - Creator III

Something like this maybe ? Is that what you want ?

Antoine04_0-1707993026372.png

 

Chanty4u
MVP
MVP

Try this

Create variable

vSelectedYear  =GetFieldSelections(year)

Use below 

sum({<byyear={"$(=vSelectedYear)"}>} amount)