Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can't you just wrap the whole expression in Min()?
Min(
if(sales<100, sales,
if(sales>100 and sales<10000, sales/100,
if(sales>10000, sales/1000)))
)
Although I would probably recommend that in the script you define a factor and use this instead of the nested IF in the UI:
Sales:
LOAD
*,
if(sales<100, 1,
if(sales>100 and sales<10000, 100,
if(sales>10000, 1000))) AS SalesFactor
FROM....;
Then, in the UI:
Min(Sales/SalesFactor)
Hope this helps,
Jason
Hello,
Main:
Load *,
if(sales<100, sales,
if(sales>100 and sales<10000, sales/100,
if(sales>10000, sales/1000))) as TempSales
From Table;
Load Min(TempSales) as MinSalesValue
Resident Main;
Hope it hepls you.
But i have to do this in the script?
There isn't a way to do it in the expression editor of the chart where i have to calculate the min?
Can't you just wrap the whole expression in Min()?
Min(
if(sales<100, sales,
if(sales>100 and sales<10000, sales/100,
if(sales>10000, sales/1000)))
)
Although I would probably recommend that in the script you define a factor and use this instead of the nested IF in the UI:
Sales:
LOAD
*,
if(sales<100, 1,
if(sales>100 and sales<10000, 100,
if(sales>10000, 1000))) AS SalesFactor
FROM....;
Then, in the UI:
Min(Sales/SalesFactor)
Hope this helps,
Jason
Thanks!