Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In a Bar Chart, I have first bar as Total PO NO (count(DISTINCT {<POStatus={'200'}>} PO#) ,
in the second bar to compare against the first. my logic is :
count({<date(StatusDateF) - date(TransmDateF>='2',POStatus='200'>}),OMSPO#) , but failed.
I want to count the No. of PO where its POStatus is ='200' and where the StatusDateF - TransmDateF is equal or less than 2 days.
Can someone pls help.
Thank you.
Hi Settu,
I have got the first bar correct using :
count(DISTINCT{<POStatus={'200'}>}OMSPO#) based on this Table :
the challenge now is the 2nd bar, I need to count the OMSPO# , where theTransmdateF & StateDAteF are the Min date and the POStatus = '200 , and DayDiff is <= 2 days. Appreciate if you could help.
I tried this : But failed.
aggr(count(distinct(if((min(StatusDateF)-min(TransmDateF))>=2 and POStatus='200',OMSPO#)))
Thank you.
Hi,
Can you provide the sample data? Then, we can test and give the proper expression.
Just try this..
=Count(If(Aggr(min(StatusDateF), OMSPO#)-Aggr(min(TransmDateF), OMSPO#)>=2
and POStatus='200', OMSPO#))
Hi,
Pls find attach sample file. Thank you very much.
Regards,
Andros Goh
Hi Andros,
May be like Attached..
Hi,
I saw the attached QVW. But I need the solution on the bar chart.
1 bar showing the Total OMSPO# (which I already solved). The other bar which is the “KPI” should Count the no. of OMSPO# where the POStatus=’200’, MIN date for StatusDateF, Min date for TransmDate and DayDiff<=2.
My scripts for Expression (second bar Target2) was below but wrong. I need the correct Expression for the chart ! Thank you.
aggr(count(distinct(if((min(StatusDateF)-min(TransmDateF))>=2 and POStatus='200',OMSPO#)))
[cid:image002.jpg@01D1428E.022910D0]
Regards,
Andros Goh
Hi Andros,
Please try this for second expression
Count(
{
<
$(=Min({<POStatus={'200'}>}StatusDateF) - Min({<POStatus={'200'}>}TransmDateF))=2
>
}
OMSPO#)
Hi,
There is error on the comma : between ..” 2,OMSPO#)”
Count({<$(=Min({<POStatus={'200'}>}StatusDateF) - Min({<POStatus={'200'}>}TransmDateF))<=2,OMSPO#)
I think is because of the <= that caused it. I tried <={‘2} also failed.
Regards,
Andros Goh
Hi Andros,
I think it's copy-paste error, there is no comma between .” 2,OMSPO#)” I had put the expression in multiple lines to make it easy to understand.
Try below.
Count({<$(=Min({<POStatus={'200'}>}StatusDateF) - Min({<POStatus={'200'}>}TransmDateF))=2>} OMSPO#)
Hi,
Pls see below : there is error after the =>2}. Thank you.
Regards,
Andros Goh
Hi,
Don't worry about that red line, sometimes it gives you that kind of indication even if you expression if correct. use it ans see if you are getting the desired result. I tested this expression myself and it's working.