Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
abonnery
Contributor III
Contributor III

Measure with if and when 2 dimensions equate

Dear Qlik Experts. 

I am struggling with creating a measure where 2 fields are equals. 

What I am trying to do is to have the 3rd field below not null. 

I am trying to sum all measures [EAC -FA] where the dimension [Cost Baseline version - FA] (2nd image) is equal to the dimension  below (2nd field in the 1st image and this code works):

 

only({<[Year - FA]={2020}>}
if([Month - FA]<>1 and [Month - FA]<>12,
if([Month - FA]<=10,'RF_'&[Year - FA]&'_0'& Num([Month - FA]-1),'RF_'&[Year - FA]& '_' & Num([Month - FA]-1)),'.'))

 

As you can see below, I have tried to make this new measure work (3rd field) with this code without any success : 

 

Aggr(sum(if([Cost Baseline Version - FA]=
Aggr(only({<[Year - FA]={2020}>}
if([Month - FA]<>1 and [Month - FA]<>12,
if([Month - FA]<=10,'RF_'&[Year - FA]&'_0'& Num([Month - FA]-1),
'RF_'&[Year - FA]& '_' & Num([Month - FA]-1)),
'.'))
,[Month - FA]) ,[EAC - FA]/1000000)),[Month - FA])

 

pb 2 fields equates.PNGRF_2020.PNG

Do you wee why the last code isn't working ? The syntax of the 2 fields I am trying to equate is EXACTLY the same. Maybe I need to add a # somewhere ?

I have not tried it with a set analytics because I don't know how to do it with a "simple" if function. 

Thank you very much for your help. I have been stuck for days on this. 

 

 

Labels (2)
0 Replies