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: 
amiroh81
Creator
Creator

Sense set measure from inline column

Hi all,

I'm try to load inline table with KPI name and KPI formula ,

after that i config on table the KPI as dimension and the KPI formula as measure but always i got error message.

 

 

 

KPI:
LOAD * INLINE [kpi, kpi_formula
Count, SUM(count)
%Success, SUM({<group_value='GOOD'>}count)/SUM(count)
];

 

 

Where am I wrong?

I also tried to insert the formula into a variable without success.
I guess there is something wrong with my syntax

my syntax for measure is something like that , but it still not work- {"=$(=$(=kpi_formula))"}

Thanks

Labels (3)
6 Replies
agigliotti
Partner - Champion
Partner - Champion

Hi @amiroh81 ,

The correct syntax is: SUM( {< group_value = {'GOOD'} >} count ) / SUM(count)

Best Regards 

amiroh81
Creator
Creator
Author

Thanks 

your right but this is not the problem ,

the problem is when i define on the measure the column kpi_formula.

even when i change the formula to your syntax its didn't work

Best Regards 

 
agigliotti
Partner - Champion
Partner - Champion

How are you using kpi_formula field in your chart object?

amiroh81
Creator
Creator
Author

Hi

i tried multiple options:
1. {"=$(=$(=kpi_formula))"}

2.=kpi_formula

3.i also tries with variable  ='$(vKpi_formula)'

 

i think its a syntax issue but I'm not sure what and where ?

Thanks

agigliotti
Partner - Champion
Partner - Champion

let's try with the below expression:

if( kpi = '%Success', $(=only( {< kpi = {'%Success'} >} kpi_formula)),
if( kpi = 'Count', $(=only( {< kpi = {'Count'} >} kpi_formula))
))

amiroh81
Creator
Creator
Author

Its work...

But what can i do if i have long list of KPI's ?

I am looking for an elegant solution for all my metrics

Besides, it does provide a solution to the question but not good enough for what I'm looking for 🤗

thanks for the idea and for your time