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: 
RSvebeck
Specialist
Specialist

Uncheck "supress zero values" in my Extension object ?

Hi.

Again, possibly a simple question from a novice...


In a ordinary chart, I can uncheck "Supress zero values" which will let me see all dimensions even if the expression has nothing to calculate for a specific value in the dimension.


If I have two tables like this:


TableA
ID, Descr
A,  Alfa
B,  Beta
C,  Gamma


TableB
ID, Qty
A, 10
A, 20
A, 50
B, 10
B, 40


I make a simple chart with a simple sum(Qty) expression, and with ID as dimension.
I uncheck "Supress Zero values" -> I will see all three values of ID (A,B,C) and the sum of Qty for each (80,50,-)


I can not find how to uncheck "supress zero values" in my extension object. When I loop my data like this:


for (var rowIx = 0; rowIx < myData.Rows.length; rowIx++)
{
var row = myData.Rows[rowIx];
alert (row[0].text + " - " + row[1].text);
}


I see that I get only 2 rows, A and B and nothing at all for dimension 1 value C. This is kinda expected behaviour for a normal chart when "supress zero" is checked, but How do I not supress zero values for a extension object?

Best Regards,

Robert Svebeck

Svebeck Consulting AB
1 Solution

Accepted Solutions
ErikWetterberg

Hi,

I actually did test my latest suggestion,

<Initiate Name="Chart.SuppressZero" Value="0" />

What version are you using?? I have tried this in Qv11. When you change your extension you might need to remove the sheet object fromn the docuament and add it again, to get the new definition. Did you try this??

Erik

View solution in original post

7 Replies
ErikWetterberg

Hi Robert,

Not sure how to solve this, I have not tested, but you could try adding the following to the Definition.xml file:

  <Initiate Name="Chart.Dimension.0.ShowAll" value="1" />

This should turn on the 'ShowAll' flag for your first dimension.

Hope this helps

Erik

RSvebeck
Specialist
Specialist
Author

Hi Erik.


I added the line in my definition.xml but I still only get dimension values where there is a value from my expression.

But I might do things wrong so I will prepare a new simple extension that is just only testing this.  I will post back with more info soon.


Best Regards Robert

Svebeck Consulting AB
RSvebeck
Specialist
Specialist
Author

Hi Again.


So - I Did a simple isolated test (see attached documents).


I did not work with Chart.Dimension.0.ShowAll.


Still only get two out of three.

Best Regards
Robert Svebeck

Svebeck Consulting AB
ErikWetterberg

Sorry, wrong property in my first post (should have tested...). Try setting 'Chart.SuppressZero' to 0.

Your Definition.xml should be something like this:

<?xml version="1.0" encoding="utf-8"?>

<ExtensionObject Label="SupressZeroTest" Description="SupressZeroTest">

    <Dimension Label="Dimension" Initial="" TargetName="Dimension" />

    <Measurement Label="Measure" Initial="" TargetName="Measure" />

    <Initiate Name="Chart.SuppressZero" Value="0" />

</ExtensionObject>

Erik

RSvebeck
Specialist
Specialist
Author

Hi Erik


Did not work either. But I think I know why.We have a mix up of two different settings.

A chart has two kind of options for supressing or showing null values or zero values.

One is located in the dimension tab and is called "Show all values", which is probably what your settings is controlling here.

The property I need to switch in my extension is located in the Presentation Tab and is called "Supress zero values".

The supress Zero values is by default checked, but I want it to be unchecked.

In my example in my earlier post, I have two charts, both with the two different settings on this property, and the result of this setting is visible in the charts.


Btw. I have now tried all sorts of settings in the xml but none of them works:

"Chart.Dimension.0.SupressZero" Value="0"
"Chart.Dimension.0.Supress-ZeroValues" Value="0"
"Chart.Dimension.0.SupressZeroValues" Value="0"

"Chart.Presentation.SupressZeroValues" Value="0"

//Robert

Svebeck Consulting AB
ErikWetterberg

Hi,

I actually did test my latest suggestion,

<Initiate Name="Chart.SuppressZero" Value="0" />

What version are you using?? I have tried this in Qv11. When you change your extension you might need to remove the sheet object fromn the docuament and add it again, to get the new definition. Did you try this??

Erik

RSvebeck
Specialist
Specialist
Author

Hi. Solved! I removed the sheet object and added it again, now it works. Thanks! //Robert

Svebeck Consulting AB