Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

How to show data starts on?

I am using the below expression to show the starting date of the data if the period goes back before the period starts. So the below expression worked perfectly.

If the data exists for the selected date then as per the selected date, date should be visible. What changes is required to achieve the 2nd requirement. Please help!

date(Min({<Period=>}Period), 'MM/DD/YYYY')

12 Replies
brijesh1991
Partner - Specialist
Partner - Specialist

Sorry to say, but clear explanation will help us to flash inputs. Would be happy to have an example also.

sunny_talwar

So the Minimum date should only be visible if you have data available for a selected date? Is that your requirement?

May be this:

If(Sum(FieldName) > 0, Date(Min({<Period>}Period), 'MM/DD/YYYY'))

qlikviewforum
Creator II
Creator II
Author

If the user selects 07/01/2013 in the Calendar and data exists only from 07/01/2014, it should show 07/01/2014 since the data only exists from 07/01/2014. So the above expression worked as per this.

Now if the user selects 08/01/2014 in the Calendar it should show 08/01/2014 since the data exists for the selected date.

Hope the requirement is clear now.

qlikviewforum
Creator II
Creator II
Author

What is "FieldName" here?

Sorry if I have not explained the requirement clearly. I have explained it again. Please check and let me know.

qlikviewforum
Creator II
Creator II
Author

Any update from anyone on this?

brijesh1991
Partner - Specialist
Partner - Specialist

Sum({$<Period={'$(=Min(Period))'}>}Field) //Where your period is in num format; convert it to date if require.

qlikviewforum
Creator II
Creator II
Author

Thanks for your response.

I think requirement is still not clear. I need to show the starting date of the data against each row in a straight table. What you have suggested will do sum(Field) for the Min(Period).

date(Min({<Period=>}Period), 'MM/DD/YYYY')


If the user selects 07/01/2013 in the Calendar and data exists only from 07/01/2014, it should show 07/01/2014 since the data only exists from 07/01/2014. So the above expression worked as per this.

Now if the user selects 08/01/2014 in the Calendar it should show 08/01/2014 since the data exists for the selected date.

If the requirement is still not clear please let me know.

avinashelite

some thing like this

if(getfieldselection(Period)<date(Min({<Period=>}Period), 'MM/DD/YYYY'),date(Min({<Period=>}Period), 'MM/DD/YYYY'),Period)

jonathandienst
Partner - Champion III
Partner - Champion III

Perhaps:

=Date(RangeMax(Min({<Period=>} Period), Period), MM/DD/YYYY')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein