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

Text Object Calculation

Hi,

I want to create a text box that says: Data Processed From 1/1 of the year prior to the selected year through the max report date of the year prior to selected year. Ex. "Data Processed From 1/1/2016 - 5/31/2016" when 2017 is selected.

I have the first part but am having trouble with the second.

=If(Only(Year),'Data Processed From 1/1/' & (Only(Year)-1))

It doesn't have to be all in one formula, but that would be ideal

1 Solution

Accepted Solutions
sunny_talwar

May be this:

=If(Only(Year),'Data Processed From ' & Date(YearStart(Date, -1), 'M/D/YYYY') & '-' & Date(AddYears(Max(Date), -1), 'M/D/YYYY')

View solution in original post

5 Replies
Clever_Anjos
Employee
Employee

Maybe

='Data Processed From ' & YearStart(Min(Date)) & ' - ' & YearEnd(Max(Date))

I´m guessing you have a field called Date

sunny_talwar

May be this:

=If(Only(Year),'Data Processed From ' & Date(YearStart(Date, -1), 'M/D/YYYY') & '-' & Date(AddYears(Max(Date), -1), 'M/D/YYYY')

byrnel0586
Creator
Creator
Author

Thank you. It's called ReportDate, but I am needing the year prior to the year that is selected to show.

byrnel0586
Creator
Creator
Author

Thanks again, Sunny!!

sunny_talwar

No problem at all