Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can you please help me with the syntax for distinct count.
This is the field structure
Order_Number | DDA | DDQ | OTIF |
---|---|---|---|
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
1 | 1 | 1 | 1 |
2 | 1 | 1 | 1 |
2 | 1 | 1 | 1 |
2 | 1 | 1 | 1 |
3 | 1 | 1 | 1 |
3 | 1 | 1 | 1 |
I want count of Order number when OTIF=1;
In the above case Count should be 2.
I am trying the syntax
XYZ=count({<OTIF=1>[DISTINCT]}Order_Number) and I am getting an error.
Please not DDA, DDQ and OTIF all are calculated fields.
TIA
Arjun
Hi,
that actually looks good. You could replace it with an IF_construction and see if that works.
I don't know how your LOAD looks - just keep in mind that, if you want to base one calculation on another done in the same LOAD, you cannot use the alias_name, but you have to repeat the calculation - or you do a preceding LOAD (put another LOAD statement, just without the FROM-part, above the main one - then you can use the alias_names of fields.
HTH
Hi,
There are some mistake in your set analysis
try below
=count({<OTIF={'1'}>} DISTINCT Order_Number)
Regards
Hi,
Well I did not read that OTIF is calculated field
Is it in Script or in chart, if it is in chart
then
try
count(if(OTIF_Expression=1,Distinct Order_Number))
If it is in script then you get OTIF as field in Front end
then above set analysis in my previous post will work for you.
Regards