Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i have products say bost,horlicks,rose milk with prices respectively.
when i pull product as dimension and
expression1:
sum(price)
expression2:
sum(price)*10
expression3:
if((sum(pricek)=sum(pricek1)),'Y','N')
the result of expression3 displays 'Y' .
why is it happening this way; actually it should display 'N' right?
PFA if needed clarification.
hic
I think the reason is related to the use of aggregation over the column label (or column() function). AFAIK, you cannot use aggregation functions such as Sum, Avg, Count, etc... over the column labels.
Try this instead:
If(pricek = pricek1, 'Y', 'N')
Sum(pricek) was giving 0 and so was Sum(pricek1) and that is why the equality was holding true:
yea, what can be the reason behind it?
I think the reason is related to the use of aggregation over the column label (or column() function). AFAIK, you cannot use aggregation functions such as Sum, Avg, Count, etc... over the column labels.
Even if i use fields name like:
if((sum(price)=sum(price)),'Y','N')
also it shows 'Y ---> which wrong
i am thinking what can be the exact reason behind this
Why is Sum(price) = Sum(price) giving you Y wrong? They are the exact same thing and should equal.
Have you tried this?
If(Sum(price) = Sum(price) * 10, 'Y', 'N')
ho its my mistake.thank you