Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

While Multiplying Variables in Dimension & Measure

Dear Experts,

While multiplying variables in dimension i.e. $(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty it gives accurate result in Table chart.

Whereas if I i want to use the same expressions in measure of the same Table chart or in KPI (we have to use measure so the result is not correct) i.e. Sum($(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty) the result is being multiplied by the factor of 9 or something.

what could be the reason for this wrong result, I also tried to Aggr but could not get the desired results.

Thanks & Regards

11 Replies
sunny_talwar

In an expression, the variables are determined based on the dimension. You might be able to do something like this

Sum(Aggr($(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty, RowNumber))

Here RowNumber is created in the script using RecNo() as RowNumber for the fact table.

NZFei
Partner - Specialist
Partner - Specialist

If $(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty is working in table chart by some dimension (Say the dimension is "Customer" for example), try this in the KPI measure:

=sum(aggr($(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty, Customer))

Not applicable
Author

Thanks Sunny.

Not applicable
Author

Thanks Fei Xu.

Not applicable
Author

Hi Sunny,

I am trying to put condition in your recommended solution, it works fine but when i try to put condition in it {<FGCat = 'PM'>}. It does not work, can you please guide:

Sum({<FGCat = 'PM'>} ($(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty))

sunny_talwar

Try this:

Sum({<FGCat = 'PM'>} Aggr($(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty, RowNumber))

Not applicable
Author

Thanks for reply, I have tried that.

Sum({<FGCat = 'PM'>} Aggr($(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty, RowNumber))

its not working. can you please suggest any other idea.

Not applicable
Author

Thanks for reply.

Sum({<FGCat = 'PM'>} Aggr($(vFGCompPrice) * $(vFGCompCurRate) * FGComponentQty, RowNumber))


I tried but it didn't work.

NZFei
Partner - Specialist
Partner - Specialist

Try

{<FGCat={PM}>}