Skip to main content

Hello,

i have a problem to create a bar chart, where one dimension is the date, and the KPi should be a count of values, which have specific attributes (ends with special characters). I need 2 bars here, one for values which ends on "PV1" and one which end on "PA1".

The problem is, that i don't want to count the values which ends to PV1, i want to have the count of value B, if value contains PV1

Every two bars per dimension, eg month.

grafikthx in advance

On the column chart component, create 1 Dimension as the date and 2 KPIs to get 2 Bars.

 

Sum the values of Value B when ends in 'PV1'

SUM(

CASE WHEN "TABLE"."VALUE_A" LIKE '%PV1' THEN "TABLE"."VALUE_B"

ELSE 0

END)

 

Sum the values of Value V when ends in PA1

SUM(

CASE WHEN "TABLE"."VALUE_A" LIKE '%PA1' THEN "TABLE"."VALUE_B"

ELSE 0.0

END)

 

If you just want to count the cases, then

 

SUM(

CASE WHEN "TABLE"."VALUE_A" LIKE '%PA1' THEN 1.0

ELSE 0.0

END)

 

BARCHART


On the column chart component, create 1 Dimension as the date and 2 KPIs to get 2 Bars.

 

Sum the values of Value B when ends in 'PV1'

SUM(

CASE WHEN "TABLE"."VALUE_A" LIKE '%PV1' THEN "TABLE"."VALUE_B"

ELSE 0

END)

 

Sum the values of Value V when ends in PA1

SUM(

CASE WHEN "TABLE"."VALUE_A" LIKE '%PA1' THEN "TABLE"."VALUE_B"

ELSE 0.0

END)

 

If you just want to count the cases, then

 

SUM(

CASE WHEN "TABLE"."VALUE_A" LIKE '%PA1' THEN 1.0

ELSE 0.0

END)

 

BARCHART

Thanks,

small updates and it works fine :-)

 

count(distinct

CASE WHEN "TABLE"."VALUE_A" LIKE '%PV1' THEN "TABLE"."VALUE_B"

ELSE NULL

END)


Reply