Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am new to qlikview and I am trying to figure this out. I have three separate list boxes they are a selection box for populating a straight table. So I have 2 report measure boxes, one with cost data and one without. The other one is the dimensions box, at least one measure and dimension must be selected in order for a chart to be shown. My code worked find with just one measure and one dimension but I am having trouble with the if statement.
=if(GetSelectedCount(%Dimensions) > 0 AND GetSelectedCount(%Measure)>0,1 ,0)
Worked fine,
But if I try to add another one like this I cant figure out how to do this.
if(GetSelectedCount(%Dimensions)>0 AND GetSelectedCount(%CostMeasure),1,0)
any help would be great
mike donoghue wrote:
if(GetSelectedCount(%Dimensions)>0 AND GetSelectedCount(%CostMeasure),1,0)
Did you may be miss a > 0 for the second GetSelectedCount()
Oops that's a typo in the question sorry about that.
=if(GetSelectedCount(%Dimensions) > 0 AND GetSelectedCount(%Measure)>0,1,0)
or if(GetSelectedCount(%Dimensions)>0 AND GetSelectedCount(%CostMeasure)>0,1,0)
This is how it is written now.
Try this:
=If(
(GetSelectedCount(%Dimensions) > 0 and GetSelectedCount(%Measure) > 0) or
(GetSelectedCount(%Dimensions) > 0 and GetSelectedCount(%CostMeasure) > 0), 1, 0
)
This solution comes out to be the same problem. If I select one from dimension and measure, all of the selections within costmeasure show up. I need the two to be completely separate. but will populate the same chart.
thank you sunny