Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

Hi @amiroh81 ,

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

Best Regards 

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
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
MVP
MVP

How are you using kpi_formula field in your chart object?

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
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
MVP
MVP

let's try with the below expression:

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

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
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