Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
george456
Creator
Creator

IF statement - Multiple criteria

Dear community

 

I need some help with the following:sum(if(Year2Date(PERIOD,-1,if(MONTH(LatestDate)>11,1,MONTH(LatestDate)+1),LatestDate),IF(BRAND='Pr1' , 'Pr2',$(vMeasure))))/1000

I have the above formula, I am struggling to get the multiple IF criteria to function correctly. What would be the correct syntax.

 

Please help

 

Regards

1 Solution

Accepted Solutions
george456
Creator
Creator
Author

Dear Community

 

I have sorted the problem with the below formula:

 


SUM({<BRAND={'Pr1','PR 2'}>}if(Year2Date(PERIOD,-1,if(MONTH(LatestDate)>11,1,MONTH(LatestDate)+1),LatestDate),$(vMeasure)))/1000

Thanks

View solution in original post

3 Replies
sunny_talwar

What exactly is your condition here?

If(Year2Date(PERIOD, -1, If(Month(LatestDate) > 11, 1, Month(LatestDate)+1),LatestDate)

What are you checking Year2Date to?

george456
Creator
Creator
Author

Dear Community

 

I have sorted the problem with the below formula:

 


SUM({<BRAND={'Pr1','PR 2'}>}if(Year2Date(PERIOD,-1,if(MONTH(LatestDate)>11,1,MONTH(LatestDate)+1),LatestDate),$(vMeasure)))/1000

Thanks

george456
Creator
Creator
Author

Thanks for quick reply, I managed to sort it out. 

 

Regards