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

Multiplying two fields in a expression!

Hi

Imagine if Date is there are as a dimension in line chart and I want some to have some below in the expression. Is it possible?


Sales * Count(ID) //Where Sales and ID are the fields.


I tried something same like above but it is not giving any value. Is there is anyother way of doing it please.

Hope some can help me out.

47 Replies
maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi,

Please explain ur problem in details. What are the dimenssions, we can use the aggr function also.

Can u post some sample application?

Thanks

tresesco
MVP
MVP

i think you are missing SUM function. try : Sum(Sales)*Count(ID)

Regards, tresesco

maneshkhottcpl
Partner - Creator III
Partner - Creator III

HI,

Or use Sum(Sales*aggr(Count(ID),Dimenssion))

Not applicable
Author


tresesco wrote:
i think you are missing SUM function. try : Sum(Sales)*Count(ID)


I have already tried that but it giving in correct result.

If try that as per your suggestion, where Sales=306 and ID=1244.

There result should be 306 * 1244 = 380664 but where as if I try as per your suggestion it is giving 14845896.

Not applicable
Author


Manesh wrote:
Please explain ur problem in details. What are the dimenssions, we can use the aggr function also.
Can u post some sample application?<div></div>


Thanks!

Dimension is a Date. I think if you look into the below reply you should get to know what I am looking for. If not please let me know.

maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi,

Please check the frequency of Sales.

send me ur applicatio (Sample).

tresesco
MVP
MVP

Are you trying : Sum(Sales) * Count (ID) (count would count the occurance/ frequency of ID, it would not give you ID value) OR,

Sum(Sales*ID) OR Sum(Sales) * ID All are very much different. it depends on your data and your requirement. if it is getting you confused, please upload your sample application as suggested by Manesh.

Regards, tresesco

Not applicable
Author


Manesh wrote:
Please check the frequency of Sales.
send me ur applicatio (Sample). <div></div>


Above sugggestion also didn't work. I am sorry I cannot attach the sample application. I think you can use your own data that you have to work on it.

deepakk
Partner - Specialist III
Partner - Specialist III

hi Attitue,

I think it should be Sum(Sales) * count(distinct ID)