Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
WE ARE LISTENING! New Navigation for Qlik Community, Sept. 26: TELL ME MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
She1
Employee
Employee

Aggregation on calculated master measure.

Hello,

I need to find the maximum value of a calculated master measure field which has the expression as below. I tried to club aggr function with max but doesn't seem to be giving the desired output.

(Sum(

{<recruitment_stage = {'ACTIVE'}>}

revenue_score)

+

Sum(

{<recruitment_stage = {'ACTIVE'}>}

employee_score)

+

Sum(

{<recruitment_stage = {'ACTIVE'}>}

data_analytics_score)

+

Sum(

{<recruitment_stage = {'ACTIVE'}>}

existing_partnerships_ana_score)

+

Sum(

{<recruitment_stage = {'ACTIVE'}>}

existing_partnerships_auto_score)

+

[Other_Partnership_DA _Score] ),recruitment_stage))

 

Thanks!

Labels (1)
1 Solution

Accepted Solutions
Or
Champion
Champion

Quite hard to guess at the issue with just a general "Not giving the desired output" - some sample data (and expected output) would be helpful in this scenario. Using max(Aggr()) does seem like the correct approach, but hard to say without specifics.

Additionally, that looks like it was clipped from a larger formula (perhaps the aggr attempt) as the ,recruitment_stage)) part seems out of place.

Max(Aggr(FormulaHere , Dimension(s)Here))

Note that the bottom part - Other_Partnership_DA_Score -  lacks an aggregation function, which means it will be treated as Only([Other_Partnership_DA _Score]). I'm not sure if that's what you're after or not.

View solution in original post

3 Replies
Or
Champion
Champion

Quite hard to guess at the issue with just a general "Not giving the desired output" - some sample data (and expected output) would be helpful in this scenario. Using max(Aggr()) does seem like the correct approach, but hard to say without specifics.

Additionally, that looks like it was clipped from a larger formula (perhaps the aggr attempt) as the ,recruitment_stage)) part seems out of place.

Max(Aggr(FormulaHere , Dimension(s)Here))

Note that the bottom part - Other_Partnership_DA_Score -  lacks an aggregation function, which means it will be treated as Only([Other_Partnership_DA _Score]). I'm not sure if that's what you're after or not.

She1
Employee
Employee
Author

Other_Partnership_DA_Score is again a master measure field with the expression as below 

Sum(
{<recruitment_stage = {'ACTIVE'}>}
if (WildMatch(other_partnership,'*tableau*'),4,0)
+
if (WildMatch(other_partnership,'*power bi*'),4,0)
+
if (WildMatch(other_partnership,'*microstrategy*'),4,0)
+
if (WildMatch(other_partnership,'*looker*'),3,0)
+
if (WildMatch(other_partnership,'*domo*'),3,0)
+
if (WildMatch(other_partnership,'*timextender*'),3,0))

 

By desired output I mean the max value of the numerical column generated by the expression,just as we would easily find the max(database field).

 

She1
Employee
Employee
Author

Thank you so much!

Max(Aggr(FormulaHere , Dimension(s)Here)) worked .

I was making a syntax error.