Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
i have a table like this:
LineNr | myVar |
---|---|
1 | Sum( {<Tbl1.Field_1={"10"}>} Value ) |
2 | Sum( {<Tbl1.Field_1={"75"}>} Value ) |
3 | Sum( {<Tbl1.Field_1={"130"}>} Value ) |
now i need to have a Table Diagramm and calculate the value of field "myVar" in my table as a cilumn.
I have tried expressions like $(myVar) , $($(myVar)) , $($(=Only(myVar)) , ..... but none of them calculate the experssion!
Anybody has an idea?
Many Thanks - Peyman
This should work as an expression:
Pick(Match(myVar,$(=Chr(39)& Concat(myVar, Chr(39)&','&Chr(39),LineNr) & Chr(39))),$(=Concat(myVar,',',LineNr)))
What is the dimension? If your table is a data island, chances are that when you use myVar in a chart (table diagram) a Cartesian product is created: Every field will associate with every variable/formula. This means that the expression has no idea which field in myVar to evaluate thus returning null.
If you are trying to create a table with KPI, try working with ValueList() or ValueLoop() instead.
Hi Martin,
the LineNr is my Dim. and i have considerd the point you hav mentioned in my set analysis.
My Problem is to calculate the content of a filed as an experssion in my table diagramm.
Best Regards - Peyman
This should work as an expression:
Pick(Match(myVar,$(=Chr(39)& Concat(myVar, Chr(39)&','&Chr(39),LineNr) & Chr(39))),$(=Concat(myVar,',',LineNr)))
Hi Martin,
it's really berliant! I have to test this tomorrow.
I think that this will work.
the only problem is performace, becuse my table is relativ big and vars are long. I'm not sure how long can be the strings in QV.
Best Regards - Peyman
I think performance should be fine because the concat() function is calculated only once for the table. All that ofc as long as your expressions are straightforward themselves.