Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

show only the last value in a graphic

is it possible to show only the last value (written in the Graphic):

grafik3.gif

Thanks....

1 Solution

Accepted Solutions

Re: show only the last value in a graphic

For example, if your dimension is Year and your expression is sum(Sales), you need to set up a second expression that looks like the following:

if(Year=$(=max(Year)), sum(Sales), '')

An example is also attached.

9 Replies
datanibbler
Esteemed Contributor

Re: show only the last value in a graphic

Hi Ingo,

so you want this whole x-axis (1990 to 2004), but only the value for 2004 visible?

How about editing the "background colour" of the chart (formula_properties, click on the "+" sign) to be

- blue for the last dimension value

- white otherwise

HTH

Best regards,

DataNibbler

Re: show only the last value in a graphic

For example, if your dimension is Year and your expression is sum(Sales), you need to set up a second expression that looks like the following:

if(Year=$(=max(Year)), sum(Sales), '')

An example is also attached.

Not applicable

Re: show only the last value in a graphic

Hey,

thank you for the quick response.

The line should be visible, but only the last value should be shown in the graphic:

test.gif

Not applicable

Re: show only the last value in a graphic

Hey Nicole,

its working....thank you very much for the correct solution.....great!!

Best regards...

Re: show only the last value in a graphic

I'm glad it works

Not applicable

Re: Re: show only the last value in a graphic

Hi Nicole,

sorry, one more question. In the following case it doesnt work (second Graphic). Do you have any idea? Thank you in advance.

Best regards...

sales.gif

sbobbyraj
Contributor III

Re: show only the last value in a graphic

Hi Ingo,

It is a because of a problem with your Date format.

try this:

if(num(Datum) = $(=num(max(Datum))), Umsatz_Auto, '')

Not applicable

Re: Re: show only the last value in a graphic

Hi,

thank you very much . In the above example your solution is working. Do have any idea for the following

one?Is the date Format, the Variable or the group by period the Problem?

sbobbyraj
Contributor III

Re: Re: show only the last value in a graphic

Hi,

I think you'd better change your model to create a separate calendar from your model, like this:

FACT:
LOAD
     Anliegen_Nr,
     [Vers. Person],
     Eingangskanal,
     Anliegen_Status,
     A_Eröffnungsdatum,
     A_Erledigungsdatum,
     A_Abschlussdatum,
     ANL_versch_Flag,
     ANL_versch_Anz,
     ANL_erl_min
FROM
C:\Users\p14890\Desktop\test.xls
(biff, embedded labels, table is [Sheet1$]);

CALENDAR:
LOAD DISTINCT
  A_Eröffnungsdatum      as Date,
  Month(Date(A_Eröffnungsdatum))    as Mois,
  Year(Date(A_Eröffnungsdatum))    as Annee,
  'Q'&Ceil(num(Month(Date(A_Eröffnungsdatum)))/3) as Trimestre
RESIDENT
FACT:
;

Then you can work easily on the year, month or date as you want.

Community Browser