Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
nburton78
New Contributor

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
Valued Contributor

Re: Using a calculated expression as a dimension

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

nburton78
New Contributor

Re: Using a calculated expression as a dimension

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
Valued Contributor

Re: Using a calculated expression as a dimension

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.