Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statements

Hey Guys,

I have an excel file in the attachment where I have collected 15 minutes values of climate data from 01/01/2015 to 31/12/2015.

I have the following columns:

- Begin

- Eind

- Piek

- Dal

- Gas

and i have used the Begin column to create my calendar as shown below

LOAD

     Begin,

     Month(Begin) AS Maand,

     Year(Begin) AS Year,

     Day(Begin) AS DagvdMaand,

     WeekDay(Begin) AS DagvdWeek,

     Hour(Begin) AS Uur,   

     Eind,

     Piek,

     Dal,

     Gas,

     T,

     Q,

     U,

     FTE,

     BVO

    

So I want to write an expression as follows:

If the sum of the Piek+Dal = 0 or empty for any of the months, then 365  minus those days in the months that have zero or empty values. I don't know how to go about it. Please any help in figuring these out will be truly appreciated.

Thanks

2 Replies
its_anandrjs

Try this ways

LOAD

     Begin,

     Eind,

     Piek,

     Dal,

     Gas,

     T,

     Q,

     U,

     FTE,

     BVO,

     If( Piek+Dal = 0, 365 - [Your Days Field Here], [Your Days Field Here]) as CalculatedField

FROM

(ooxml, embedded labels, table is Blad1);

Note:- [Your Days Field Here] this is your days field add your field here in place of my field.

Regards,

Anand

Digvijay_Singh

Check if this can help, front end based -

=365-Sum(Aggr(if(rangesum(sum(Piek)+Sum(Dal))=0,1),Maand,DagvdMaand))

Capture.JPG