Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9129

The Record select is excluding rows

$
0
0

The following record select formula, is not showing rows which we want to see. The user passes a month and year param and then we show the not sold

for that month year as well as the previous month.

However, we do want to show rows that did not sell for the entire year and even years back. This formula is only showing the rows that had some sales in the past 2years. It's better use for management to see all items not selling also years back to the last sale.

 

(

if {?Month}=1 then

    (({SUMPRT.IQA01} =0  and {SUMPRT.IQYER#} = {?Year}) and ({SUMPRT.IQA12} =0  and {SUMPRT.IQYER#} = {?Year}-1))

else if {?Month}=2 then

    ({SUMPRT.IQA01} =0 and {SUMPRT.IQA02} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=3 then

    ({SUMPRT.IQA02} =0 and {SUMPRT.IQA03} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=4 then

    ({SUMPRT.IQA03} =0 and {SUMPRT.IQA04} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=5 then

    ({SUMPRT.IQA04} =0 and {SUMPRT.IQA05} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=6 then

    ({SUMPRT.IQA05} =0 and {SUMPRT.IQA06} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=7 then

    ({SUMPRT.IQA06} =0 and {SUMPRT.IQA07} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=8 then

    ({SUMPRT.IQA07} =0 and {SUMPRT.IQA08} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=9 then

    ({SUMPRT.IQA08} =0 and {SUMPRT.IQA09} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=10 then

    ({SUMPRT.IQA09} =0 and {SUMPRT.IQA10} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=11 then

    ({SUMPRT.IQA10} =0 and {SUMPRT.IQA11} =0 ) and {SUMPRT.IQYER#} = {?Year}

else if {?Month}=12 then

    ({SUMPRT.IQA11} =0 and {SUMPRT.IQA12} =0 ) and {SUMPRT.IQYER#} = {?Year}

)


Viewing all articles
Browse latest Browse all 9129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>