Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
VilmaB
Contributor
Contributor

Selecting value based on multiple conditions

Hello experts,

I have a data table:

 data.JPG

Could hepl me tyo find out,  what should be an expresion to select Saifi value, for each ID, where  duration is more then 0,05 and has  max customer number. Dimension is Time.

The result table should be like this:

data1.JPG

Thanks, Vilma

Labels (3)
2 Solutions

Accepted Solutions
ramasaisaksoft

Hello Vilma,

 

As per the expected output

Create a Pivot /Straight table

Dimensions are: Time,ID,Duration,Customer Number  

Expression =Aggr(Min(Saifi),ID)

 

check this once & correct me if i understood wrongly

View solution in original post

sunny_talwar

8 Replies
sunny_talwar

This seems more easily doable if ID was the dimension and Time was one of the expression... would you be able to provide the Excel file with the data so that we can load that instead of hand typing everything to create a sample.

VilmaB
Contributor
Contributor
Author

There is my file.

Ok, lets try if ID is dimension.

 

 

sunny_talwar

Not looking for an image file, but an Excel file

VilmaB
Contributor
Contributor
Author

🙂

ramasaisaksoft

Hello Vilma,

 

As per the expected output

Create a Pivot /Straight table

Dimensions are: Time,ID,Duration,Customer Number  

Expression =Aggr(Min(Saifi),ID)

 

check this once & correct me if i understood wrongly

VilmaB
Contributor
Contributor
Author

Hello Ramasaisaksoft, 

as you suggestion works fine, but I still need to do not include Duration dimension where it is less then 0.05. 

Time dimension is created as calendar group (time, week, month...), so if I choose the month, it shows all rows separately, but I need the SAIFI sum for this time period.

could you help me 🙂

 

sunny_talwar

Check attached

image.png

VilmaB
Contributor
Contributor
Author

Thank you! It works.