Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple math expression does not seem to be working in Qlik Sense

Now I admit, I don't have much experience in writing expressions, however based on what I have read in the forums I believe I have this set up correctly.  My import contains the price per item and the qty for the price (3/$1.00) and also Qty sold but does not have the total amount sold.  My expression is ([Cur Price]/[Cur Price Qty])*[Qty Sold] and I have used the "create new measure" tool in Quick Sense to insert the fields from my database. When I try to use it in a graph, I use my Store field as a Dimension and the created measure.  Qlik Sense then tells me "The chart is not displayed because it contains only undefined values.  When I load the Store as a measure and only Qty Sold it graphs correctly.

I am also having trouble with a markdown expression, ([Cur Price]/[Cur Price Qty])-([Reg Retail]/[Reg Retail Unit]) it is giving me the same error.

These are the first measures I have tried to create, so I am clearly doing something wrong.  Anyone able to tell me what?

12 Replies
Not applicable
Author

OK attached is the QVF file.

hic
Former Employee
Former Employee

I have looked at it and cannot find any problem, but you need to tell me what your expectations are...

If I use

   Sum(([Reg Retail]/[Reg Retail Unit])*([Qty Sold]))

as expression for Markdown, I get the same result in Qlik Sense as in Excel.

HIC

Image2.png

Image4.png

Not applicable
Author

It appears you have an extra set of parenthesis around Qty Sold that I never tried because it stood alone and but that appears to have corrected the calculation!  I applied this same principle to other calculations I was having difficulty with and it fixed those as well!  Thank you so much for your help. I would have overlooked that entirely had I not seen you do it in your expression.