

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
reference columns with dynamic label in an expression
Hello
I got a pivot table with several expressions,
the labels of the columns of the expressions are dynamic; the display text depends on what user selects and values of other variables:
so here is an example of the label of the measure:
=if($(=max(YEAR))<$(=vL.CurrentFiscalYear)
,'FY ACTUAL'&chr(10)&'Revenue'
,pick($(vL.Toggle.KPI.Display)
,'FY $(vL.CurrentFiscalYearLatestScenarioType)'&chr(10)&'Revenue'
,'YTD ACTUAL'&chr(10)&'Revenue'))
now there is another measure that uses the calculation of the measure above
so how can I reference that column above in the expression which should be something like :
sum(Field1) / above column
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I put the expression of the label in a variable; let's say vL.Label
then in the expression where I want to reference the column I put [$(vL.Label)]:
sum(Field) / [$(vL.Label)]
the expression editor gives syntax error but still the measure is valuated

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Try with
Column(Number)
Ex: If the above exp is ur first expression, then try like
sum(Field1) /Column(1)
Please close the thread by marking correct answer & give likes if you like the post.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I put the expression of the label in a variable; let's say vL.Label
then in the expression where I want to reference the column I put [$(vL.Label)]:
sum(Field) / [$(vL.Label)]
the expression editor gives syntax error but still the measure is valuated
