Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue with set analysis in calculated dimension

Hello everybody !

i am facing an issue with a calculated dimension.

I explain: I have a cross table with Article code, article description and Plant as dimension; i want to add NumContract as calculated dimension.

Num contract is displayed when  startdate<date analysed <Enddate

startdate and enddate are variables that i have created and they are defined as follow :

startdate : date(start contract date ,'DD/MM/YYYY') start contract date : 41640 and enddate : date(end contract date,'DD/MM/YYYY')

My expression is like this but it doesn't work and i need help :

aggr(only({<[Date analysed]={">$(date(startdate))<$(date(enddate))"}>}[Num contrat]),[Num contrat],[Article code], [Article description],Plant)

Thanks for your help !

20 Replies
Anil_Babu_Samineni

I wonder, Why do you need startdate and enddate in your scenario, Rather you can try like below

aggr(only(Num contrat]),[Article code], [Article description],Plant)

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
Anonymous
Not applicable
Author

because i need to display only data with data analyzed between startdate and enddate : this is the customer's need..

Anonymous
Not applicable
Author

I have tried to mock up data..

Anonymous
Not applicable
Author

please see sample above..

sunny_talwar

startdate and enddate are fields and not variable? Do you make selection in them before you want to see an output in your table?

Anonymous
Not applicable
Author

Variables. i do only selection on date analyse

antoniotiman
Master III
Master III

Hi,

what about change Set Analysis (calculated per chart) to If() (per Rows) like this

=If([Date analyse] >= Date([Début validité contrat]) and [Date analyse] <= Date([Fin validité contrat]), [Numéro contrat])

Anil_Babu_Samineni

The reason i am asking you is i am not sure which value you are getting in text box when you use this

Date(startdate) and date(enddate), Can you show the image for these 2 expressions in text box

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
Anonymous
Not applicable
Author

I have posted sample data above finally and i put these variables in textbox. May be it will be easier for you to help.

Anil_Babu_Samineni

I don't have qlik software due to vocation, May be sunny offer you better

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