Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create an expression within a dimension that populates a cell in a chart.
The expression should look at the "Resolution Status" and the "Record Class"
The "Record Type" field should have values there where values are not on the spreadsheet that is used as a source and need to be populated with either the name "Asset" or "Site"
I have tried different expressions that seem to be ok in syntax but do not fill in the empty fields in the Record Type column.
What I am trying to do is this:
If([Resoluttion Status] = 'NEW" and [Record Class]='Router,1,0 [Record Type]='Asset')
This maybe wrong above but I a trying to fill in the - with Asset or Site
Any help is appreciated.
Thanks !!!
Try something like:
= IF([Resolution Status] = 'NEW" and [Record Class]='Router',
'Asset',
'Site')
Or use field names in places of the strings I used.
Thanks John. I will try that and let you know if that worked.
I tried this in a couple of different places.
Under the Load and within the dimension for the cell and this still will not replace the hyphen - with the word Asset. The syntax seems to be correct as in both cases I do not get errors in the debug. I also tried using the "Case Where"
if([Resolution Status],'NEW' & [Record Class],'Router'),[Record Type]='Asset'
Here is my expression within the dimension. If I can fix the syntax on this it may work.
=If(IsNull([Record Type]),if(DR01_Inactive_sites_with_installed_inventory=1 or HR05_Invalid_CLLI=1,'Site','Asset'),[Record Type], if([Resolution Status]='NEW' and [Record Class]='Router'),[Record Type],'Asset')
any ideas will be appreciated
Hi,
Is it possible to share sample file
Note : To learn qlik function you can use Help menu It will provide sample and syntax.
Regards,
Prashant
can you tell us logic of your if condition???
Regards,
Sure. I have two data sources, one being an excel spreadsheet and the other being a db. The chart is populated by both. In the event the router is in the spreadsheet the cells in the chart are populated correctly. If the router is not in the excel spreadsheet the Resolution Status cells will show “NEW” and the Record Class cells “Router” when this happens the Record Type will be a hyphen. What I am attempting to do is key off the text “NEW” and the text “Router” and if this is true than replace the hyphen with the text “Asset”
I have tried an "if" statement in the LOAD part of the script and have tried placing logic within the dimension and in both cases most of the time the syntax is correct by the results are not what is expected.
Thanks Prashant
Here is my if statement within the LOAD
if([Resolution Status]='NEW' & ([Record Class]='Router') as Asset_Router
Hi,
As far as what i understood from explanation, below expression might help
if([Resolution Status]='New' and [Record Class]='Router','Asset','Router')
Use it as expression in chart
Regards,