Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
lionking15
Creator
Creator

current year

Hi,

I have created straight table to show sales of current month,for that i have used expression

=Sum ({$<Year ={$(=YearName(max(Date)))},>} Sales)

But i want to show the label as "current year-year" means if i select 2016 the label should be "current year-2016"

for this what should i write in label???

Thanks!!!!!!!

6 Replies
arulsettu
Master III
Master III

try this

'Current Year'&GetCurrentSelections(year)

lionking15
Creator
Creator
Author

Hi Arul

that syntax is not working

vinieme12
Champion III
Champion III

=Current Year - ' & Year

or

=Current Year - ' & GetFieldSelections(Year)

, will also work

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
susovan
Partner - Specialist
Partner - Specialist

Hi Giridhar,

You can also try this below expression.

='Current Year' & Max(Year)

or

='Current Year' & Year

Warm Regards,
Susovan
arulsettu
Master III
Master III

try this

Current Year - ' & Max(Year)


do you have year filed?


if you dont have

try creating year in script

year(date) as year

Anil_Babu_Samineni

Perhaps This,

VYear = YearName(max(Date),'YYYY')

VYear1 = Sum ({$<Year ={'$(VYear)'},>} Sales)

='Current Year' & '$(VYear1)' & '  ' & GetFieldSelections(Year)

For me This is Working(Try Same Expression)

='There were no sales in the months of ' & Concat(distinct {1<Start_Month=E({$<Start_Month={"=sum(DISTINCT PaidWithTax)<>0"}>}Start_Month)>}Start_Month,',',Num(Start_Month))

  &' '&'for '&GetFieldSelections(Shop)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful