Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
gino2780
Creator
Creator

Ifcondition with regard to two or more fields

Hello Qlik community,

here is what i've done so far to give you a sneak peek before i raise my question:

I'm working on implementing specific validation rules into a data-quality-management-app for my data.

The source data is an excel file, which comes from a sharepoint list.

The validation rules should check the denoted fields, or more specific inconsistent excel cells contents and write it to a .csv data-file.

Here are some examples of the script of validation rules which i've already implemented:

Validierung:

LOAD

Konzernnummer,

// Feld muss numerisch sein

if(isnum(Konzernnummer),'ok','Fehler') as Konzernnummer_alphanum,

// Feldlänge muss 7 stellig sein und numerisch

if(isnum(Konzernnummer) and len(Konzernnummer)=7,'ok','Fehler') as Konzernnummer_Länge,

// Validierung Feld darf nicht leer sein

if(Konzernnummer<>NULL(),'ok','Fehler') as Konzernnummer_leer,

// Feld muss numerisch sein

'EXCEL' as SourceSystem,

RowNo() as Zeilennummer,

today() as ExtractionDate,

FileName() as Dateiname   

FROM [lib://DQM/LG Liste.xlsx]

(ooxml, embedded labels, table is owssvr);

// Export Ergebnis als qvd und txt

Store Validierung into [lib://DQM/LG Liste Data_Ergebnis.qvd](qvd);

// FROM

//

// (qvd);

Store Validierung into [lib://DQM/LG Liste Data_Ergebnis.csv](txt);

// Store Validierung2 into [lib://DQM/LG Liste Data_Ergebnis2.csv](txt);

// Ergebnisdatei wird mit Tagesdatum versehen (im Dateinamen) - wird somit nicht überschrieben

Store Validierung into [lib://DQM/LG Liste Data_Ergebnis_$(vDatum).qvd](qvd);

Store Validierung into [lib://DQM/LG Liste Data_Ergebnis_$(vDatum).csv](txt);

Now i'm looking forward to another validation rule, that include if conditions ('and' | 'or' combinations) with regard to two fields.

The logic expression should look like this:

If Potenziale seitens NL = ja, then ABRE E Ort ≠ KG | BG

If Potenziale seitens NL ≠ ja, then ABRE E Ort = KG | BG

Header 1Header 2
ABRE E OrtPotenziale seitens NL
(Leer) (means missing, no cell entry)(Leer) (means missing, no cell entry)

BG

ja
GAnein
GLunbekannt
KG
KK
L
nicht vorhanden
NL
S
SK

As output i'd like to write cases of combinations into my validation

Nachricht geändert durch Giacinto Abbruzzese

10 Replies
gino2780
Creator
Creator
Author

Hello again,

i've figured out why the flags weren't showing the right counts. I had some synth keys that caused inconsistent frequencies(Count) when comparing the source excel-file & filter selections with the frequencies that the qlik dqm-app & flag selections showed.

Now it's all fine after fixing the synth keys. I can reproduce the source data information data completely consistent with the dqm-app counts ('Error' 'OK'). Thanks again for your help. Great job.