Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have calculated share using the expression,
=sum(Volume) / sum(total<MONTH_NAME,MARKET_NAME> Volume)
the table shows the share for all the products in the market.
when i select some products, then share calculated among those selected products for a given month and given market.
i dont want it to calculate share among those products, i want share to be calculated for all the products.
ex;
Product Name | Share |
---|---|
Hum | 60% |
Enb | 20% |
Ste | - |
Sim | 20% |
so if i unselect Enb from the product list, the share should show like this
Hum-60%
Sim-20%
Ste- -,
It should not show like this
Hum-70%
Sim-30%
Ste--
so how to change the expression, so that i will get like this
Hum-60%
Sim-20%
Ste- -,
hi,
i used this expression
if(MetricName='NRx Share',
(Sum(Volume)/
aggr(NODISTINCT Sum({<PRODUCT_NAME=>} Volume),MONTH_NAME)))
it works fine
Hi,
Can you attach sample file that you are working.
Try calculating the Total and store it in variable and use this variable in expression like this.
your variable should be
vTotalValue = Sum({1} Volume)
So, now total is calculated, this value is used in expression like this
=sum(Volume)/vTotalValue
Now you will get the result as you expected.
Hope this helps you.
Regards,
Jagan.
hi,
i used this expression
if(MetricName='NRx Share',
(Sum(Volume)/
aggr(NODISTINCT Sum({<PRODUCT_NAME=>} Volume),MONTH_NAME)))
it works fine