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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Christian_
Contributor II
Contributor II

Count if (from measures)

Hello everyone,

I have created a calculated measure based on various fields. This evaluates each name with a rating from A to E ('Rating').

Now I would like to show in diagrams how many names ('Names') I have per rating level. Since the rating is a measure and not a dimension, I cannot use it as desired. My approach is therefore to create another separate measure for each rating level (i.e. 5 in total), which I can then use in a bar chart, for example.

Here is my approach for Rating = A

Count(If(Rating = 'A', Name))

and

Count({<Rating = {'A'}>} Name)

Now to my problem: It seems that the reference to 'Rating' as measure in the formula does not work. If I replace it with a field from my script for testing purposes, it works.

Does anyone here have an idea?

Best regards

Christian

Labels (4)
11 Replies
Christian_
Contributor II
Contributor II
Author

Unfortunately, it is a little more complex. There are seven individual measures behind the measure 'Score'.

Christian__0-1723557261204.png

 

Kushal_Chawda

@Christian_  then try below

Create a calculated dimension as below. ScoreID is the field at which Score is calculated, you can replace it with relevant field in your data.[Score] is your measure which is already there

aggr(if([Score]>=$(vScoringBewertungA),dual('A',1),
if([Score]>=$(vScoringBewertungB),dual('B',2),
if([Score]>=$(vScoringBewertungC),dual('C',3),
if([Score]>=$(vScoringBewertungD),dual('D',4),
dual('E',5)
)
)
)
),
ScoreIDName)

 

with calculated dimension above then you can create a simple measure as count(Name)