Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

How to pick Minimum date

Hello All,

I need a help in writing a set analysis expression for one of my requirement 

Requirement :

I need to show start of month date and Value in a kpi's for the selected date

Below is a sample data set ,

Capture.PNG

 

So basically when ever the application opens by default max date get  selected in the above example (30/06/2021)Now in the above  left KPi I need to show date as 05/06/2021 and Values as 4000

lets say if i select 29/05/2021 then in it should show  10/05/2021 and value as  1000

 

I mean to say that min values should be picked from the selected 

 

Please suggest me how to achieve the above requirement 

 

thanks

1 Solution

Accepted Solutions
Kushal_Chawda

@kunkumnaveen  Assuming that your Date filed is in proper Date format, you can write below expression

=sum({<Date>}if(Date = min(total {<Date={">=$(=monthstart(max(Date)))<=$(=max(Date))"}>}Date), Value))

View solution in original post

2 Replies
Kushal_Chawda

@kunkumnaveen  Assuming that your Date filed is in proper Date format, you can write below expression

=sum({<Date>}if(Date = min(total {<Date={">=$(=monthstart(max(Date)))<=$(=max(Date))"}>}Date), Value))

kunkumnaveen
Specialist
Specialist
Author

Thank you  it working ,

but could you plz explain me  what exactly  the below  highlighted part bringing 

if(Date = min(total {<Date={">=$(=monthstart(max(Date)))<=$(=max(Date))"}>}Date)