Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Bandi
Contributor
Contributor

Issue with creating a measure

Hi everyone,

I'm in the middle of the process of creating my very first application in  QS. 2 days ago I have stuck when I wanted to create a new measure.

My whole first dashboard base on one measure, which looks like this:

Num(Count({<Resposta={TAK}>} [Store])/ Count ({<Resposta-={'N/A'}>} [Store]), '#0,0%')

 

For the second dashboard I was trying to calculate somethink like "Calculated measure" 

For one of my dimensions which includes only 2 fields  "Operation1" and "Operation2"  I need to calculate the difference between them. 

For example: the attached measure would give as a result 90% for Operation1 and 70% for Operation2 and I would like to see the final outcome 20% (Operation1 - Operation2) 

I have tried to accomplish it with this IF measure but it didn't work.

if([Function]='Operation1',Num(Count({<Resposta={TAK}>} [Store])/ Count ({<Resposta-={'N/A'}>} [Store]), '#0,0%'))
- (if([Function]='Operation2',Num(Count({<Resposta={TAK}>} [Store])/ Count ({<Resposta-={'N/A'}>} [Store]), '#0,0%')))

I will be really greatful for any help 🙂 

 

Labels (4)
1 Solution

Accepted Solutions
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @Bandi !

           Try this way:

Num((Count({<Resposta={'TAK'},Function={'Operation1'}>} [Store])
/ Count({<Resposta-={'N/A'}, Function={'Operation1'}>} [Store])
)
-
(Count({<Resposta={TAK},Function={'Operation2'}>} [Store])
/
Count({<Resposta-={'N/A'},Function={'Operation2'}>} [Store])) , '#0,0%')

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

2 Replies
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @Bandi !

           Try this way:

Num((Count({<Resposta={'TAK'},Function={'Operation1'}>} [Store])
/ Count({<Resposta-={'N/A'}, Function={'Operation1'}>} [Store])
)
-
(Count({<Resposta={TAK},Function={'Operation2'}>} [Store])
/
Count({<Resposta-={'N/A'},Function={'Operation2'}>} [Store])) , '#0,0%')

Help users find answers! Don't forget to mark a solution that worked for you!
Ksrinivasan
Specialist
Specialist

hi,

try this

=(if([Function]='Operation1',

(Num(Count({<Resposta={TAK}>} [Store]))/ (Count ({<Resposta-={'N/A'}>} [Store])), '#0,0%')) - 

(if([Function]='Operation2',

(Num(Count({<Resposta={TAK}>} [Store]))/ (Count ({<Resposta-={'N/A'}>} [Store])), '#0,0%'))

 

ksrinivasan