Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
Not applicable

Re: pie charts setting default color

hi Rob

sorry for the late reply but this is how it looks after applying the above mentioned equation  in.png

sergey_maka8
Valued Contributor

Re: pie charts setting default color

What equation and for what purposes you had added?

Not applicable

Re: pie charts setting default color

=if(Source=Source, color( mod(FieldIndex('Source',Source)-1,18)+1 ), LightGray())


Rob will this equation work for a bar chart??

Not applicable

Re: pie charts setting default color

hi Sergey

this is the equation

=if(Customer=Customer

,color(mod(

Match(

Customer

,$(=chr(39) & concat(Customer,chr(39) & ',' & chr(39)) & chr(39))

)

-1,18)+1)

, LightGray())

i tried this equation cz colors are repeating in the pie chart

Re: pie charts setting default color

I'm missing something about the settings in your QVW. I'm sorry, I can't help you further without a copy of the actual QVW.

-Rob

Not applicable

Re: pie charts setting default color

thanks Rob you helped me a lot.. i am sorry that i can not attach my qvw... will this equation work to a bar chart as well??

Re: pie charts setting default color

Give it a try

Not applicable

Re: pie charts setting default color

i did try it but when i select a bar the positions changes.. for ex-sample if i select the 3rd bar it shifts to the 1st bar position n the rest the order changes... that's why i asked whether it will work with bar charts also

rank_nandha
Contributor II

Re: pie charts setting default color

Hi Rob,

I am using the below expression for my chart. This will help me to bring data when ever I click the appropriate button. But I am not able to use brushing concept ( let me know where to put this {1}) in my expression. Can you please help me here?

 

=if(Period=1, Count({$<d_date= {">=$(=date(interval(DAte(now()) - 7,'D'),'MM/DD/YYYY'))<=$(=date(now(),'MM/DD/YYYY'))"}>}minerva_order_id),
if(Period = 2,Count({$<d_date = {">=$(=date(interval(DAte(now()) - 30,'D'),'MM/DD/YYYY'))<=$(=date(now(),'MM/DD/YYYY'))"}>}

minerva_order_id),

if(Period = 4,Count({$<d_date = {">=$(=date(interval(DAte(now()) - 28,'D'),'MM/DD/YYYY'))<=$(=date(now(),'MM/DD/YYYY'))"}>}

minerva_order_id),

if(Period = 3,Count({$<d_date = {">=$(=date(interval(DAte(now()) - 91,'D'),'MM/DD/YYYY'))<=$(=date(now(),'MM/DD/YYYY'))"}>}

minerva_order_id),

if(Period = 5,Count({$<d_date = {">=$(=date(interval(DAte(now()) - 365,'D'),'MM/DD/YYYY'))<=$(=date(now(),'MM/DD/YYYY'))"}>}

minerva_order_id),

Count({$<d_date= {">=$(=date(interval(date(vStartdate) - 0,'D'),'MM/DD/YYYY'))<=$(=date(vEnddate,'MM/DD/YYYY'))"}>}

minerva_order_id))))))

Using this in the expression attribute 

=if(overriden_reason=overriden_reason, color(FieldIndex('overriden_reason',overriden_reason)), RGB(230,230,230))

Regards,

Nandha