Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Omarelkerm
Contributor
Contributor

Variable not working in Dimension but working in measure

Hello Everyone, 

Thank you for taking the time to read this. I am creating a report that has 2 variables that will show two different reports on the same sheet in qlik. Please refer to the screenshot for more details. The problem that I am facing is that the table is not moving with the buttons like the KPI and the bar chart in other words when I click on any of the buttons in the top of the page the KPI and bar chart move accordingly but the table in the bottom of the page does not move at all . Since I have measures in the bar chart and the KPI I am assuming that the problem is with  my dimension function which is this : =If(materialGroup_1='1',If(Match(MaterialType,'ZOH')and (Not Match(MaterialGroupCode,'1210','1211','1212','Z321','Z322','Z324','1205','1206','1207','1208',
'1209','Z311','Z313','Z314','Z315','1225','Z35','1213','Z323','1215','1220','1221','Z351','Z352','1260','1265','1270','1275','1280','Z331','Z353','Z36',
'1255','1256','1230','1231','1232','1253','1236','1240','1241','1242','1243','1245','1246','1247','1248','1250','1251','1252','Z312','Z332','Z333','Z334','Z341',
'Z342','1100','Z121','Z122')) and not Match( MaterialStatus,'11','12','MD'),MaterialNumber),
If(materialGroup_1=2,If(Not Match( MaterialType,'ZOH','HERS')and( Match(MaterialGroupCode,'1210','1211','1212','Z321','Z322','Z324','1205','1206','1207','1208',
'1209','Z311','Z313','Z314','Z315','1225','Z35','1213','Z323','1215','1220','1221','Z351','Z352','1260','1265','1270','1275','1280','Z331','Z353','Z36',
'1255','1256','1230','1231','1232','1253','1236','1240','1241','1242','1243','1245','1246','1247','1248','1250','1251','1252','Z312','Z332','Z333','Z334','Z341',
'Z342','1100','Z121','Z122')) and Not Match(MaterialStatus,'11','12','MD'),MaterialNumber))).  The Materialgroup_1 is my variable. For your reference here is the measure function that is working properly for the KPI and the bar Chart. If(materialGroup_1=1,Count({<MaterialType={'ZOH'},MaterialStatus-={'11','12','MD'},MaterialGroupCode-={'1210','1211','1212','Z321','Z322','Z324','1205','1206','1207','1208',
'1209','Z311','Z313','Z314','Z315','1225','Z35','1213','Z323','1215','1220','1221','Z351','Z352','1260','1265','1270','1275','1280','Z331','Z353','Z36',
'1255','1256','1230','1231','1232','1253','1236','1235','1240','1241','1242','1243','1245','1246','1247','1248','1250','1251','1252','Z312','Z332','Z333','Z334','Z341',
'Z342','1100','Z121','Z122'}>}MaterialNumber),
If(materialGroup_1=2,Count({<MaterialType-={'ZOH','HERS'},MaterialStatus-={'11','12','MD'},MaterialGroupCode={'1210','1211','1212','Z321','Z322','Z324','1205','1206','1207','1208',
'1209','Z311','Z313','Z314','Z315','1225','Z35','1213','Z323','1215','1220','1221','Z351','Z352','1260','1265','1270','1275','1280','Z331','Z353','Z36',
'1255','1256','1230','1231','1232','1253','1235','1236','1240','1241','1242','1243','1245','1246','1247','1248','1250','1251','1252','Z312','Z332','Z333','Z334','Z341',
'Z342','1100','Z121','Z122'}>}MaterialNumber))) If anybody is able to help this will be awesome! Thank you in advance. 

Omarelkerm_0-1615835729084.png

 

 

0 Replies