Solved

How to create a pie chart lobby element with 2 columns of data on it


Badge +6

Hello,

I have 2 columns of data I would like to represent in a pie chart. one value for quotations won% and the other quotations lost%.

 

(SELECT COUNT (quotation_no) FROM order_quotation_line WHERE objstate IN ('CO Created' , 'Won') ) /(SELECT COUNT (quotation_no) FROM order_quotation_line WHERE objstate  IN ('CO Created' , 'Won', 'Cancelled', 'Lost', 'Planned', 'Released', 'Revised'))*100

(SELECT COUNT (quotation_no) FROM order_quotation_line WHERE objstate IN ('CO Created' , 'Won') ) /(SELECT COUNT (quotation_no) FROM order_quotation_line WHERE objstate  IN ('CO Created' , 'Won', 'Cancelled', 'Lost', 'Planned', 'Released', 'Revised'))*-100+100

 

When creating the Pie chart element. I am only able to see the Won% column represented in the pie chart. How do I configure both of these columns to show up on the pie chart?

 

icon

Best answer by Link 3 May 2023, 14:42

View original

8 replies

Userlevel 7
Badge +22

Hi @bpamlin 

could you change value aggregrate to count and test it?

Badge +6

@Link It appears “none” is the only option available from the value aggregate drop down. Thanks,

Userlevel 7
Badge +22

Can you provide a screenshot of your data source?

Badge +6
@Link 

 

Userlevel 7
Badge +22

Hi @bpamlin 

does it work?

I checked your data source and it seems to be OK.

Userlevel 2
Badge +6

Hi,

 

Not sure exactly how you want to handle the statuses for Won/Lost but an option could be to use a data source along the lines of:

 

 

And then using no Aggregation in the element:

 

Badge +6

@ajnsse This worked! Thank you!! Is there a way to also include the State ‘CO Created’ In the WON count without grouping the states?

Thanks,

Userlevel 2
Badge +6

@ajnsse This worked! Thank you!! Is there a way to also include the State ‘CO Created’ In the WON count without grouping the states?

Thanks,

Hi,

 

Great. I think you can add an OR-statement in the first CASE-clause to also include CO Created State. And also to add in that status in the Condition-section of the query.

Reply