Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All
I am reading one file which containing formulas for each row. In table I want to calculated each formula for each row in table.
Example
tblCounter
counterID | CounterName | CounterValue |
---|---|---|
1 | John | 10 |
2 | Smith | 12 |
3 | Ron | 23 |
4 | Rock | 23 |
tblFormula
formulaID | Formula |
---|---|
1 | sum(John(CounterValue)) +sum(Ron(CounterValue)) |
2 | sum(Smith(CounterValue)) +sum(Rock(CounterValue)) |
I want to show Table with Formula and its calculated value
Header 1 | Header 2 |
---|---|
sum(John(CounterValue)) +sum(Ron(CounterValue)) | 33 |
sum(Smith(CounterValue)) +sum(Rock(CounterValue)) | 35 |
I have tried to add $ Expression in measure. But I am getting Blank value in Table.
use below:
sum( {< CounterName = {"John"} >} CounterValue )
Hi Omkar,
Try with this below formula, it will work.
1. sum({$<CounterName={'John'}>+<CounterName={'Ron'}>}CounterValue)
2. sum({$<CounterName={'Smith'}>+<CounterName={'Rock'}>}CounterValue)
$ sign expansion is probably not going to work as it doesn't work on row by row basis. May be you need to use Pick Match or if statement to get this done... don't understand this too well to give you a solution for the problem... may be post a sample
Not exactly sure what you need. But you could try the following example
Assuming you're using inline tables your formula in the inline script would be (including the beginning and end double quotes) Repeat for all the formulas you need.:
''sum({<CounterName={'''John'''}>}CounterValue)+'sum({<CounterName={'''Ron'''}>}CounterValue)'''
Then your dimension would be (Your header 1)
=$(=Formula)
and your Expression would be (Your header 2)
=$(=($(=Formula)))
Hello,
Anyone came up with a solution since ? I have the same issue and none of the answers are working.