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: 
nburton78
Creator
Creator

Using a calculated expression as a dimension

Hello,

I'm working on a beast of a report.  Basically it takes a list of orders and then it assigns a reason based off the attributes that are pulled from all over the place.  I put everything in a Straight table and calculated the "Detail" column with an expression.  Now I would like to be able to chart those reasons listed in the "Detail" column and I have no idea if its possible.  I'd like to be able to count how many orders have each reason assigned.  Any ideas??

this is a very simplified version of the report:

   

order attribute1attribute 2attribute 3attribute 4Detail
ared1yes10Reason 1
bblue2yes9
cgreen3yes8
dyellow1no7
ered2no6
fblue3no5

The Detail is set by a formula that looks like "if(attribute1=red and attribute 2 = 3 then detail = Reason 1 else if….Reason 2…."

3 Replies
vamsee
Specialist
Specialist

If you use the same expression for Detail and create a calculated dimension, what is the error you have?

nburton78
Creator
Creator
Author

that would be perfect except some of the attributes are expressions also.  I could move the expressions to calculated dimensions if I can I refer to a calculated dimension?

vamsee
Specialist
Specialist

Ohh..try that if you can. I would suggest the best way go ahead is to do your data modelling at the script level.

So, multiple residents and joins should so give you an aggregated table with the detail and attributes as fields.

If you can post you QVW with script & (sample or scrambled data, I can be more specific.