Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I just learned about qualify function, and i'm trying to adjust a kpi changing only the (first) qualified name of the field.
Let me explain better: I have two tables: "Mail" and "Devices". both table have a field called "LoadingData". I'm using qualify in the load, so actually the two fields names are "Mail.LoadindData" and "Devices.LoadingData"
(cannot use the loadingdata field as a key)
Moreover I have another table: TablesAnag, containing the two values "Mail" and "Devices". I'm using this field for filter panel.
Now. I would like to show in a KPI the loading data depending on the selected field in the TablesAnag-filter panel.
I was hoping for thee kpi expression to be something like
'Loading data is :'&[ GetFieldSelection(TablesAnag).LoadingData]
in this way, if I select Mail in TablesAnag, i get mail.loadingData, while if I select Devices, I get Devices.LoadingData.
ofc is not working. 🙂 what's the right exdpression? Or is there a better way to do so?
Thank you very much
Edit:
The point is starting with two, then keep on adding new ones.
I'm expecting to have 35/40 tables at the end
GetFieldSelections(TablesAnag) shouldn't be enclosed in quotes - it's a function returning a string, not a string in itself.
right,
so I tried
[$(=GetFieldSelections(TablesAnag)).loadingData]
and it works 🙂
Thanks!
Given that you have just two fields, this seems like it should be simple enough with an if() or pick(match()):
If(TablesAnag='Mail',GetFieldSelections(Mail.LoadindData),GetFieldSelections(Devices.LoadingData))
Thank you for the note. The point is starting with two, then keep on adding new ones.
I'm expecting to have 35/40 tables at the end
Would have been good to lead off with that... 🙂
The general case should be:
GetFieldSelections($(='Field' & 'A')) // This gets the selections for FieldA
Replacing the inner parenthesis section with whatever formulas required to get your field name.
Yep, I edited the main question 😅
I'm not getting something, the problem is to have the result of GetFieldSelection within the name of a filed,
so if I try
"GetFieldSelections($(='TablesAnag' & '.loadingData'))"
does not work (Error in expression).
If I try
"[$(='(GetFieldSelections(TablesAnag))'&.loadingData] "
gives me no scripting errors but doesn't work either (always null)
GetFieldSelections(TablesAnag) shouldn't be enclosed in quotes - it's a function returning a string, not a string in itself.
right,
so I tried
[$(=GetFieldSelections(TablesAnag)).loadingData]
and it works 🙂
Thanks!