Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue with an expression calculation

So I'm having a table in which I'm calculating the amount of worked days filtered by the type of the activity. The expression formula is correct(I've checked with the database).
One only had activities during the third work cycle and the QlikView auto-completes the missing values(the missing values of the first and second cycle) with 0.
My issues are:
-when I'm exporting the table in Excel via a macro(I have to do extra formatting so using the built-in method would take too much time), the 0 values that are replacing the missing values are not pasted
-because of that, my expressions that calculate the amount of worked days summed for all 3 cycles return 0(this happens in my pivot tables from QlikView too)
I have the "Suppress 0 values" option unchecked and I auto-populate the missing or null values with 0.
I assume the problem is that QlikView recognizes 0 as a char/string instead of int.
So my questions are:
-Is there any way I can make QlikView recognize 0 as an integer?

-Alternatively, as a work-around the problem with the totals , how can I make a Set Expression in which a certain table column must be populated with any value? e.g: something like cycle_value -={' '}

9 Replies
YoussefBelloum
Champion
Champion

Hi,

would you be able to share some data here ? or a sample QVW ?

Anonymous
Not applicable
Author

Would the table exported in Excel help?

YoussefBelloum
Champion
Champion

In this case no.. because on the charts, if a NULL a blank is replaced by a char or a numeric value, it will change the original calculations... I was talking about the source, what you really have before you load

Anonymous
Not applicable
Author

I can't really share the database dump due to privacy issues.
Anyway, I'm having this following expression:
(Count({<ambiente = {'Ambulatorio ASL'}, Cycle = {'Cycle1'}, macro_area_codice = {'Sud'},role -= {'3'} >} DISTINCT assign_date))
How can I change the set expression so that it counts all the assign_dates that have any value different from null in the Cycle field? It would help me a lot with my current problem

YoussefBelloum
Champion
Champion

You can try this:

(Count({<assign_date={"=len(trim(assign_date))<>0"},ambiente = {'Ambulatorio ASL'}, Cycle = {'Cycle1'}, macro_area_codice = {'Sud'},role -= {'3'} >} DISTINCT assign_date))

Anonymous
Not applicable
Author

I'm looking more for something like: (Count({<ambiente = {'Ambulatorio ASL'}, Cycle -= {'<however QlikView is interpreting Null>'}, macro_area_codice = {'Sud'},role -= {'3'} >} DISTINCT assign_date))
EDIT: I've found a solution by modifying the loading script. Thanks for the help anyway, I'll let this discussion as Assumed Answered

YoussefBelloum
Champion
Champion

you asked for this:

How can I change the set expression so that it counts all the assign_dates that have any value different from null in the Cycle field?

I give you this:  assign_date={"=len(trim(assign_date))<>0"}


Can you attach some rows on an excel file to see what you have exactly on every column ?

Anonymous
Not applicable
Author

See the excel file I have attached in the replies

YoussefBelloum
Champion
Champion

Hi,

I just had a look at your file, I think it is a completely different file from what you described above..