Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am loading a table from a database.
I have 3 fields, product, sales and sales estimated.
i would like an expression of the sales estimated that on a row if sales is null then sum sales estimated if is not null then don´t do anything.
thank you
Hi,
You can create a flag in script like below.
Load Product,Sales,SalesEstimated,If(Isnull(Sales),1,0) as NullFlag From xyz;
Now in chart expression you can write.
Sum({<NullFlag = {"0"}>}SalesEstimated)
So this expression will consider only records which have value.
Regards,
Kaushik Solanki
OR even dont need set analysis expression :
Simply Do : Sum(NullFlag*SalesEstimated)
Hey,
You can handle it in script and do not worry in expression:
Load
Product,
Sales,
IF(ISNULL(Sales),[sales estimated], 0) as [sales estimated]
;
This will maintain value for sales estimated, only when Sales is null
BR,
Kuba