Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Trying to use the map feature in QS and colour by measure based on a count.
The layer is using a country field and trying to colour by measure using if like this.
=if(Count(Distinct{<[Standard]={'0','1','2','3'}>}[Standard]),RGB(204,101,118))
=if(Count(Distinct{<[Standard]={'4','5'}>}[Standard]),RGB(220,204,119) )
=if(Count(Distinct{<[Standard]={'6','7'}>}[Standard]),RGB(97,166,102)
first issue is how to link the if statements and the biggest is even when using the top 2 lines (with no error) i am getting no colour return
Any ideas please?
Thankyou in advance
DavyQliks
Sorry, I forgot to close the first expression with brackets. Hope this expression will work:
=if(Count(Distinct [Standard]) >=0 and Count(Distinct [Standard]) <4 ,RGB(204,101,118),
if(Count(Distinct [Standard]) >3 and Count(Distinct [Standard]) <6 ,RGB(220,204,119),
if(Count(Distinct [Standard]) >5 and Count(Distinct [Standard]) <8,RGB(97,166,102))))
Just play with the brackets a bit.
I don't think that will work with the approach you are taking, try using the following:
=if(Count(Distinct [Standard] >=0 and Count(Distinct [Standard]) <4 ,RGB(204,101,118),
if(Count(Distinct [Standard] >3 and Count(Distinct [Standard]) <6 ,RGB(220,204,119),
if(Count(Distinct [Standard] >5 and Count(Distinct [Standard]) <8,RGB(97,166,102))))
Hi,
Thanks for the reply, i have tried to add to the colour measure and get the following:
any ides? thank you so much
DQ
Hi,
I cannot see what's wrong or an error, can you elaborate?
Thanks Again @sonkumamon
Here is the expression in the
and the error:
I have tried to correct and cannot see where the error is to correct it but i am getting no colour returns on the map. Apologies, your help is much appreciated.
thank you
Sorry, I forgot to close the first expression with brackets. Hope this expression will work:
=if(Count(Distinct [Standard]) >=0 and Count(Distinct [Standard]) <4 ,RGB(204,101,118),
if(Count(Distinct [Standard]) >3 and Count(Distinct [Standard]) <6 ,RGB(220,204,119),
if(Count(Distinct [Standard]) >5 and Count(Distinct [Standard]) <8,RGB(97,166,102))))
Just play with the brackets a bit.
PLease dont apologies, you helped me out loads here.
Thank you so much
DQ