Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
P_S
Partner - Contributor III
Partner - Contributor III

Multi KPI with if statement

I'm trying to use Multi KPI to show customers with sales, margin, and more. I use Multi KPI with other measures and it show only the customers I would like to see but when I put measure with if statement the Multi KPI show all customers in data. This is the if statement that I used.

  If(VDR1 = 'QLIK *',
  	If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}>}[Net Margin (Performance Sales/PM)])*100/Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}>}[Net Revenue (Performance)]) > 7.99,
		If([Cust Name] = 'A',	
			If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"QLIK*"}>}[Net Revenue (Performance)]) >= 4000000, 
				Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"QLIK*"}>}[Net Revenue (Performance)])/100,			
				If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"QLIK*"}>}[Net Revenue (Performance)]) >= 2000000, 
					Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"QLIK*"}>}[Net Revenue (Performance)])*0.5/100,
					0
					)
			)
		),
				
		If(Match([Cust Name], 'B','C', 'D'),	
			If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"QLIK*"}>}[Net Revenue (Performance)]) >= 2000000, 
				Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"QLIK*"}>}[Net Revenue (Performance)])/100,
				If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"QLIK*"}>}[Net Revenue (Performance)]) >= 800000, 
					Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"QLIK*"}>}[Net Revenue (Performance)])*0.5/100,
					0
				)
			)
		)
	),
      If(VDR1 = 'X*',
      If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}>}[Net Margin (Performance Sales/PM)])*100/Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}>}[Net Revenue (Performance)]) > 9.99,
		If(Match([Cust Name], 'E','F', 'G', 'H', 'I', 'J', 'K', 'L'),	
			If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"X*"}>}[Net Revenue (Performance)]) >= 5000000, 
				Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"X*"}>}[Net Revenue (Performance)])*2/100,
           		 If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"X*"}>}[Net Revenue (Performance)]) >= 3000000, 
					Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"X*"}>}[Net Revenue (Performance)])*1.5/100,
						If(Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"X*"}>}[Net Revenue (Performance)]) >= 1000000, 
							Sum({<[invoice date] = {">=03/25/2019<=12/31/2019"}, VDR1 = {"X*"}>}[Net Revenue (Performance)])/100,
							0
                            )
                	)
				)
			)
         )
      )
   )

I use Cust Name as dimension in Multi KPI. Any suggestion would be appreciated.

1 Reply
P_S
Partner - Contributor III
Partner - Contributor III
Author

Hello, I have tried many different ways but it's not work. Any help is appreciated