Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

count if , and distinct times after target is met

Hi

in regards to temperatures 37.5

I wish to count only, after a certain number temperature target has been reached '37.5'. and only the distinct times temperature dips below 37.5

please help

test 1

TestNo     Temp

1               37.5

2               37.5

3               37.5        = 0 dips

Test 2

TestNo     Temp

1               36.5

2               37.5    (Target temp has been reached)

3               37.5

4               36.5    (dip has occurred)

5               36.5

6               37.5 

7               37.5

8               37.5   =    1 dip

please help

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

please post your data (sample date) at least .

I am understand ,why it is not working for you  .

FYI

I have done this in QLIK sense as well .

.please check my QVF.

View solution in original post

17 Replies
MK_QSL
MVP
MVP

what is dips?

joeybird
Creator III
Creator III
Author

Hi

a dip in temperature is, when a temperature goes below 37.5

please help

MK_QSL
MVP
MVP

So can I assume that certain number is 3 here..

Anonymous
Not applicable

Hi

It is like this ?

I have attached a straight table with some conditional colors .

Edited : Attachment with pivot :  working fine

joeybird
Creator III
Creator III
Author

Hi

no 1,

this is because temperature test no has to reach 37.5 first , then count distinct number dips in temperature there after  which is 1

please help

joeybird
Creator III
Creator III
Author

Hiya

the pivot is exactly right, but I am using qlik sense. I need to add this calculation to a bar chart. how many dips on a date

please help

Anonymous
Not applicable

Hi,

Have you checked my reply ? with attachment

"qlikview coummity 27.06.2017 dip-in_tempreature EDITED.qvw"?

Anonymous
Not applicable

Hi

Please find the qvw as per requirement in bar chart.

joeybird
Creator III
Creator III
Author

Hi

sorry for delay in reply...

IF(Previous(Temp)-Temp<'0','Dip','Normal') as  Temp_variation

the first issue i have is data is being loaded from a sql database ..

I have added this as an if statement, it seems to only work if you place >'0' to a <'0'

the issue I am having is when it sees the same value ,

i keep getting this for an room id

RoomID is in same table..

RoomID    TestNo     Temp   Temp_Variation                 should be

1                1              37.5        NORMAL                       

1                2              34.8        NORMAL                        DIP

1                3              37.5        NORMAL

1                4              37.5        NORMAL

1                5              37           NORMAL

1                6              37           NORMAL

1                7              37.5        NORMAL

1                8              37.5        DIP

IF(Previous(Temp)-Temp>'0','Dip','Normal') as  Temp_variation

IF I place the > in the correct way as in your script I get

RoomID    TestNo     Temp   Temp_Variation                 should be

1                1              37.5        NORMAL                       

1                2              34.8        NORMAL                        DIP

1                3              37.5        NORMAL

1                4              37.5        NORMAL

1                5              37           NORMAL

1                6              37           NORMAL

1                7              37.5        NORMAL

1                8              37.5        NORMAL

Please help