Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
MagicMag
Contributor
Contributor

Dynamic reports variable

Hi,

I'm creating a dynamic report.

In the measures, i have a variable wich is not interpreted : $(vG.vMaxAnneeMois)

In my script :

Indicateurs:
LOAD * INLINE [
LibelleIndicateur,IndicateurFormule,IndicateurNo
"Nb d'archivage GED","Nb d'archivage GED","if (GetSelectedCount(AnneeMois)=0,Count(distinct {<AnneeMois={'$(vG.vMaxAnneeMois)'}, ARCHIVE ={'1'}> } DOCUMENT_ID),Count(distinct {<ARCHIVE ={'1'}> } DOCUMENT_ID))",1
];

In Qliksense, i Call my measure like this :

=$(=FirstSortedValue(IndicateurFormule, IndicateurNo,1))

Can you tell me What's wrong ?

Thank you for your Help.

Regards.

2 Replies
lfetensini
Partner - Creator II
Partner - Creator II

Your load inline have 3 headers columns (LibelleIndicateur, IndicateurFormule, IndicateurNo) and 4 content columns

See below:

Indicateurs:
LOAD * INLINE [
LibelleIndicateur,IndicateurFormule,IndicateurNo
"Nb d'archivage GED","Nb d'archivage GED","if (GetSelectedCount(AnneeMois)=0,Count(distinct {<AnneeMois={'$(vG.vMaxAnneeMois)'}, ARCHIVE ={'1'}> } DOCUMENT_ID),Count(distinct {<ARCHIVE ={'1'}> } DOCUMENT_ID))",1
];

 

The rest of your code its ok.

Support your colleagues. Remember to "like" the answers that are helpful to you and flag as "solved" the one that helped you solve. Cheers.
MagicMag
Contributor
Contributor
Author

Hi,

Thank you for your answer.

I made the corrections.

However, it still doesn't work. The variable $(vG.vMaxAnneeMois) is not taken into consideration , the data are not filtered on the selected month and I have a global sum instead.

Do you have any suggestion ?

Sincerely.