Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Average Trendline isn't working properly

Hello all,

I have thes following graph which is showing only one average trendline instead of two:

QlikView Help14 - Pricing Setting.png

It has two expressions, one for custom data labels and another with the data being displayed. If I remove the labeling expression it begins to show the 2nd trendline. Any ideas how to fix this?

The expression for this data is really long, but we can summarize it by a simple SUM:

=Sum ([Customer end-price])

The label expression is:

='Customer End Price: '&Sum ([Customer end-price]) &chr(10)

& Customer &chr(10)

&'Sales Area: ' &[SALES AREA] &chr(10)

&'Case #: ' &[ST Case Number] &chr(10)

19 Replies
Highlighted
Contributor III
Contributor III

I'm sorry! I meant Y-axis

Highlighted

What is wrong with the Y axis number, the two charts above have the same looking y-axis... what am I missing?

Highlighted
Contributor III
Contributor III

My original file the Y-axis is not showing the correct value:

QlikView Help15 - Pricing Setting.png

If I got to number and fix it, then the label doesn't work:

QlikView Help16 - Pricing Setting.png

If I go to the axis setting I can make static steps to it instead, but then I can't configure homw many decimal places it shows, which is not optimal:

QlikView Help17 - Pricing Setting.png

Highlighted

If you can share a sample where it can be replicated, I can take a look at this...

Highlighted
Contributor III
Contributor III

This is my full expression:

Dual(

     text('Customer End Price): '

          &(num(if([Offer Currency]=vCurrency,

          sum([Customer end-price]),

          sum([Customer end-price]/[Rate]* if(CurrencyCheck=vCurrency,RateCheck)))/1000000

          ,'#,##0.##', '.' , ','))&

     &chr(10)

     &'Customer: ' &Customer

     &chr(10)

     &'Sales Area: ' &[Sales Area]

     &chr(10)

     &'Case #: ' &[ST Case Number]

,

     (if([Offer Currency]=vCurrency,

          sum([Customer end-price]),

          sum([Customer end-price]/[Rate]* if(CurrencyCheck=vCurrency,RateCheck))))/1000000

)

This report checks each currency used and converts it to the currency the user wants to see.

Highlighted

I don't see anything going wrong with the expression itself... don't really know, but again, if you can share a sample, I am more than happy to take a look

Highlighted
Contributor III
Contributor III

This is only happening if I divide by 1 million, if I leave the raw values the axis adjust itself correctly, any idea why?

For the data I can't share much that would help, as the rate part of the expression is online driven and it's seems to me that this part of the expression that is causing an error, since I did the same thing with the sample further above and it worked properly.

Highlighted

Very difficult for me to know what might be the issue without having a look, may be someone else can help

Highlighted
Contributor III
Contributor III

Hello Sunny

I managed to do a clone with some mock data so you can have a look.

Can you think of a way to work this without using static values for the axes?

Highlighted

I have tried quite a few things, but not able to make this work... but one thing I found was the you have used this as your environment variables

SET ThousandSep=',';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='R$ #.##0,00;-R$ #.##0,00';

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

SET MonthNames='jan;feb;mar;apr;may;jun;jul;aug;sep;oct;nov;dec';

SET DayNames='mon;tue;wed;thu;fri;sat;sun';

I am guessing that you don't want your Thousand and Decimal Separators to be comma. Do you know what you have to use? I would suggest fixing this in the script so that you can save some trouble later. Similarly make sure Money separators look good to....

I changed the above to this

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='R$ #.##0,00;-R$ #.##0,00';

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

SET MonthNames='jan;feb;mar;apr;may;jun;jul;aug;sep;oct;nov;dec';

SET DayNames='mon;tue;wed;thu;fri;sat;sun';

And using this expression

Dual(

text('Customer End Price (in M')&vCurrency&'): ' 

          &num(if([Offer Currency]=vCurrency, 

          sum([Customer end-price]/1000000), 

          sum([Customer end-price]/[Rate /EUR]* if(CurrencyCheck=vCurrency,RateCheck)/1000000)) 

          ,'#,##0.00') 

     &chr(10) 

     &'Customer: ' &Customer 

     &chr(10) 

     &'Sales Area: ' &[Sales Area] 

     &chr(10) 

     &'Case #: ' &[ST Case Number]

,

num(if([Offer Currency]=vCurrency,

sum([Customer end-price]/1000000),

sum([Customer end-price]/[Rate /EUR]* if(CurrencyCheck=vCurrency,RateCheck/1000000)))

,'#,##0.00')

)

I get this

Capture.PNG

I am still unable to increase the number of decimals you would want to see, but atleast this works without having to add steps on the Axis tab.

View solution in original post