Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use a calculated dimension within an expression

Hi All! This is my first question on Communicty and hopefully it will help.  I have data which I want to show the results in Quartiles.  I have been able to successfully show this using a calculated dimension named 'Quartile' using the following code:

=If(num(dollar_sales_total,'#,##0.##','.',',') <= $(v25PercentFractile),'Quartile 1',

     If(num(dollar_sales_total,'#,##0.##','.',',') > $(v25PercentFractile) and

     num(dollar_sales_total,'#,##0.##','.',',') <= $(v50PercentFractile),'Quartile 2',

          If(num(dollar_sales_total,'#,##0.##','.',',') > $(v50PercentFractile) and

          num(dollar_sales_total,'#,##0.##','.',',') <= $(v75PercentFractile),'Quartile 3','Quartile 4')))

Now within a pivot table I want to have an expression which calculates the median sales value for the various quartiles.  Any suggestions on how I may be able to do this?  Thanks for the assistance.


2 Replies
Not applicable
Author

Hey Chad,

Welcome to the community. This is a great place to learn, explore and share.

Regarding your question, did you just try adding the expression you want into the table like maybe avg(Amt).[This is just an example]

Thanks

AJ

makkemik
Partner - Contributor III
Partner - Contributor III

put the example files we try to help you.

wellcome on board

regards

Murat