Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello (sorry do not speak in English)
there is a table
Checknum | Price without discount | Sum of Discounted | discount Amount |
122444 | 10 | 8 | 2 |
122445 | 15 | 15 | 0 |
It is necessary to select only those checks which have discount and skip the checks that have no discount. And to calculate the amount of revenue these checks.
(If it was possible, I would like to calculate the price and dishes that were in the checks which had a discount but for which the discount is not applied, but it is probably very difficult ..)
Thank you very much for your help!
Use where condition (where discount_Amount > 0)
and how to write it? I do not understand ..
LOAD *;
SQL SELECT Checknum,Price_without_discount,Sum_of_Discounted, discount_Amount
FROM SCHEMA.TABLE_NAME
WHERE discount_Amount > 0;
thanks for the report , but I did not change the sql query mou . Rather - myeon table which is - it's not a table , I received a table calculations qlikview.
for example, discount_Amount= Price_without_discount- discount_Amount
trying to write it something like this:
if ({(sum(sum (PAYSUM))-(sum (PRLISTSUM))={">0"}>})), CHECKNUM
but does not work
Try this expression for your dimension
If(Aggr(Sum([Price without discount]-[Sum of Discounted]),Checknum) > 0,Checknum)