Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
pandreozzi
Creator
Creator

Fill In The Blank

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 !!!

12 Replies
jrepucci15
Creator
Creator

Try something like:

= IF([Resolution Status] = 'NEW" and [Record Class]='Router',

'Asset',

'Site')

Or use field names in places of the strings I used.

pandreozzi
Creator
Creator
Author

Thanks John. I will try that and let you know if that worked.

pandreozzi
Creator
Creator
Author

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'

pandreozzi
Creator
Creator
Author

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

PrashantSangle

Hi,

Is it possible to share sample file

Note : To learn qlik function you can use Help menu It will provide sample and syntax.

if ‒ QlikView

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

can you tell us logic of your if condition???

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
pandreozzi
Creator
Creator
Author

 

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

 

pandreozzi
Creator
Creator
Author

Here is my if statement within the LOAD

if([Resolution Status]='NEW' & ([Record Class]='Router') as Asset_Router

PrashantSangle

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,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂