Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
pradeep92
Partner - Creator II
Partner - Creator II

KPI Required on Dimension with Condition and Expression in Straight Table

hello,

I have a requirement where we have a straight table with Products. Those products are colored based on a condition. 

Color Condition:

=if(sum({<Panier={'base'},ANNEE_CALENDER={'$(v_CY)'}, SOURCE={'MENSUEL'}>} CA)<>0,rgb(0,200,0),
if(sum({<Panier={'base'},SOURCE={'DIFF'}>} CA)>0 ,RGB(0,0,200),rgb(200,0,0)))

Now we also have the expression to count the no of Products.

No of Products Condition:

 
=Count({1<Panier={'base'}>} DIMART_PRIO)

Now we want the total number of Products based on the color coding of the products 

O/P: So we want the of the count of Products in Text object. Green Red and Blue can be created nearby.

Green - 4

Red - 3

Blue -3 ... PFA

Sample.PNG

 

1 Solution

Accepted Solutions
pradeep92
Partner - Creator II
Partner - Creator II
Author

Hello Sunny,

This is working fine as expected. thank you very much

View solution in original post

2 Replies
sunny_talwar

May be this

Green

 

Count(DISTINCT {<Product = {"=Sum({<Panier = {'base'}, ANNEE_CALENDER = {'$(v_CY)'}, SOURCE = {'MENSUEL'}>} CA)<>0"}>} Product)

Blue

Count(DISTINCT {<Product = {"=Sum({<Panier = {'base'}, SOURCE = {'DIFF'}>} CA) > 0"}>} Product)

Red

Count(DISTINCT Product) -
Count(DISTINCT {<Product = {"=Sum({<Panier = {'base'}, ANNEE_CALENDER = {'$(v_CY)'}, SOURCE = {'MENSUEL'}>} CA)<>0 or Sum({<Panier = {'base'}, SOURCE = {'DIFF'}>} CA) > 0"}>} Product)

 

pradeep92
Partner - Creator II
Partner - Creator II
Author

Hello Sunny,

This is working fine as expected. thank you very much