Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pirotfab
Creator
Creator

Choice criteria in set analysis

Hello,

You find the table with the infos

I want to get the time "OK" and the time "KO" for the dimension Test

The conditions: if T YPE = ESSAI then "KO3, if CODE = T100 then KO otherwise OK


For that I put these formulas =

Expression OK : sum({<TYPE-={'ESSAI'},CODE-={'T100'}>} TPS)

Expression KO : sum({<TYPE={'ESSAI'},CODE={'T100'}>} TPS)

The result

My wish is to obtain 24h on the sum of the two expressions.


Is it possible to pass only with the set analysis to realize this table or should I use one if nested moreover?



Thanks for your feedback

Cdlt

1 Solution

Accepted Solutions
sunny_talwar

Try this for OK

=sum({$-(<TYPE={'ESSAI'}>+<CODE={'T100'}>)}TPS)

View solution in original post

16 Replies
sunny_talwar

May be change KO to this

Sum({<TYPE = {'ESSAI'}>+<CODE = {'T100'}>} TPS)

pirotfab
Creator
Creator
Author

Hello,

Thanks for your feedback

the result with your expression

i want to get this
thanks
sunny_talwar

Try this for OK

=sum({$-(<TYPE={'ESSAI'}>+<CODE={'T100'}>)}TPS)

pirotfab
Creator
Creator
Author

Thank you Sunny

Can you explain this expression pleas ?

pirotfab
Creator
Creator
Author

Hi Sunny,

I'm trying to adapt this expression on my work app. But it doesn't word.

do you Have an idea ?

the result

i want

Thanks

sunny_talwar

From what I understand the problem is TYPE because it is all null.... is it possible to replace nulls in type field to be replaced by blanks in the script like this

LOAD TPS,

     POSTE,

     CODE,

     TEST,

     If(Len(Trim(TYPE)) = 0, ' ', TYPE) as TYPE,

     LIGNE

FROM

(ooxml, embedded labels, table is Feuil1);

pirotfab
Creator
Creator
Author

here is the result on my work app

tps ouv (s) is expression OK and Tps hors ouverture is expression KO

I want

thanks for you help

sunny_talwar

And what is the expression for Tps ouv (s)?

pirotfab
Creator
Creator
Author

Tps ouv (s) =sum({$-(<typeln={'POSTEVT'},ofessai={'ESSAI'}>+<%code_type_evt={'FERME','MAP','T402','T403','T401','T405'}>)}duree)

Tps hors ouverture =sum({<typeln={'POSTEVT'},%code_type_evt={'FERME','MAP','T402','T403','T401','T405'}>+<ofessai={'ESSAI'}>}duree)

Do you think that it is better if in the champs "TYPE" I put 1 if ESSAI and 2 if not ESSAI

Thanks