Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II

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


I can walk on water when it freezes
Labels (1)
1 Solution

Accepted Solutions
ali_hijazi
Partner - Master II
Author

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 

I can walk on water when it freezes

View solution in original post

2 Replies
MayilVahanan

Hi

Try with 
Column(Number)

Ex: If the above exp is ur first expression, then try like 
sum(Field1) /Column(1)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ali_hijazi
Partner - Master II
Author

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 

I can walk on water when it freezes