Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: How to use a calculated dimension within an expression

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
New Contributor III

Re: How to use a calculated dimension within an expression

put the example files we try to help you.

wellcome on board

regards

Murat

Community Browser