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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Oguzhan
Contributor III
Contributor III

QlikSense Count values with respect to dimension

Hello,

I have a issue where i need to count a dimension Measurecode and if the dimension appears more than once I need to check the colum Notification. The value should be counted if the Measurecode appears more than once within the Notification.

So for example the count of Measurcode P01 is 5 but for the condition >1 is true only for notification 0011 & 0013 so i need QlikSense to display the KPI : 2 

NotificationMeasurecode
0011P01
0011P01
0012P11
0012P01
0013P01
0013P01
Labels (4)
1 Solution

Accepted Solutions
sunny_talwar

You have an extra comma in place, try this

Sum(Aggr(
    If(Count({<Measurecode = {'P01'}>} Measurecode) > 1, 1, 0)
, [Notification], Measurecode))

View solution in original post

4 Replies
sunny_talwar

May be this

Sum(Aggr(If(Count(Measurecode) > 1, 1, 0), Notification, Measurecode))
Oguzhan
Contributor III
Contributor III
Author

Seems close but it doesnt work for my whole data. If I apply a filter the KPI doesn't show the correct number. 

Somehow i only need to count the 'P01' value I tried it like below but it always give the value 0

Sum(Aggr(If(Count({<Measurecode={'P01'}>},Measurecode) > 1, 1, 0), [Notification], Measurecode))

sunny_talwar

You have an extra comma in place, try this

Sum(Aggr(
    If(Count({<Measurecode = {'P01'}>} Measurecode) > 1, 1, 0)
, [Notification], Measurecode))
Oguzhan
Contributor III
Contributor III
Author

Thank you so much, works perfect!