Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
mauvasco62
Contributor III
Contributor III

Nprinting Dynamic Name with variable

Dear friends,

i have a little (not for me) question.

i would like to use a variable in order to create a dynamic name into the final report (using Nprintg).

I wish it worked like this: every month I generate a report with data related the previous month and this value (previous month + year) must appear in the report name (for example... "ReportAlfa_2018_jan.xlsx").

I created a variable in qlik sense but it doesn't works.

The variable is :  Period_name =     Concat((year(ReferenceDate)),'-',(month(ReferenceDate)))

Where am I wrong?

Thanks for your support

Mauro

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

Hi Mauro,

sorry my bad.

try this

=(year(today()-30)) & '_' & (month(date(today()-30)))
Learning never stops.

View solution in original post

6 Replies
pradosh_thakur
Master II
Master II

Reference Date contains many date. you may want to use ( today()-30 ) in the concat and then use the variable in dynamic naming
Concat((year(today()-30)),'-',(month(today()-30)))

Learning never stops.
mauvasco62
Contributor III
Contributor III
Author

Hi

it doesn't works.

Now the report name is "REPORT ELESA_Concat((year(today()-30)),'-',(month(today()-30))).xlsx"

Mauro

pradosh_thakur
Master II
Master II

please put a '=' in front of the variable
Learning never stops.
mauvasco62
Contributor III
Contributor III
Author

Hi Pradosh.. thanks

... but it doesn't works correctly

Now appears the year but not the month.

Thanks anyway

Mauro

pradosh_thakur
Master II
Master II

Hi Mauro,

sorry my bad.

try this

=(year(today()-30)) & '_' & (month(date(today()-30)))
Learning never stops.
mauvasco62
Contributor III
Contributor III
Author

Great!

Thanks

Have a nice day

Mauro