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: 
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 !

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I resolved my issue by deleting the calculated dimension and using only set analysis in my expression :

=sum({<[start date]={"<$(=$(vNumdateanalyse))"},[end date]={">$(=$(vNumdateanalyse))"}>}[Quantity])

vNumdateanalyse = num([Date analysed])

View solution in original post

20 Replies
sunny_talwar

May be this

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

Anonymous
Not applicable
Author

I tried with equal but nothing happens

prma7799
Master III
Master III

Can you please share sample data.

Anil_Babu_Samineni

How is your Date Analyzed format looks like?

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
sunny_talwar

Would you be able to share a sample to take a look at this?

Anonymous
Not applicable
Author

I am not sure...even if I scramb data, i don't have permission to do that...

Anonymous
Not applicable
Author

Hello, sorry but i am not sur to be able to share sample data...that is the reason why i put all information in my subject description...

sunny_talwar

May be mock up data in an Excel file and provide the expected output from that sample?

Anonymous
Not applicable
Author

Date analyzed has this format : DD/MM/YYYY