Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rebeccakutz
New Contributor II

If expressions results in "invalid dimension' - any hints?

=If((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted]))/((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Lost}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Cancel}>}[Estimated Oi UnWeighted])))<=1.0 and (Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted]))/((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Lost}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Cancel}>}[Estimated Oi UnWeighted])))>=0.5,'H',

If((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted]))/((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Lost}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Cancel}>}[Estimated Oi UnWeighted])))<0.5 and (Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted]))/((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Lost}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Cancel}>}[Estimated Oi UnWeighted])))>=0.25,'M',

If((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted]))/((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Lost}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Cancel}>}[Estimated Oi UnWeighted])))<0.25 and (Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted]))/((Sum({<[Win/Lost] ={Won}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Lost}>}[Estimated Oi UnWeighted])+Sum({<[Win/Lost] ={Cancel}>}[Estimated Oi UnWeighted])))>=0,'L',

'0')))

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: If expressions results in "invalid dimension' - any hints?

If this answerd your question please mark it as answered and/or helpful. If it wasn't answered fully please ask more...

3 Replies
MVP
MVP

Re: If expressions results in "invalid dimension' - any hints?

A dimension has to created based on or including one of these to become valid:

  • Field
  • ValueList()
  • ValueLoop
  • Aggr()

Your expression has/is neither of these. A dimension will also be calculated before any rows are produced based on all the dimensions in a chart - which if you think of it would be natural.

The Aggr() function is most likely what you would need to use in your case. Something like this could be a template for  you to explore:

=Aggr(

    <Your complicated expression above> , <Dim1>, <Dim2>....

)



The <Dim1>, <Dim2> .... would be the other dimensions that your are using in your chart.

rebeccakutz
New Contributor II

Re: If expressions results in "invalid dimension' - any hints?

Great help. I always missed to include the dimension in my prior trials. Thanks a lot!!

MVP
MVP

Re: If expressions results in "invalid dimension' - any hints?

If this answerd your question please mark it as answered and/or helpful. If it wasn't answered fully please ask more...

Community Browser