Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Show revenue per year / Age of artikels of revenue

Hi all,

I have a file with revenue and the date of the first day the article was available.

My goal is to know the age of the artikels I'm doing my major revenue with.

The result should look like this:

Year Revenue

2007     50%

2008     25%

2009     10%

2010     10%

etc....

How can I create a dimension from a datafield?

how would you do this?

Thanks for your help... 

1 Solution

Accepted Solutions
MVP
MVP

Re: Show revenue per year / Age of artikels of revenue

Try something like this:

In the script:

Load

      Artikel,

     ErstedDatum,

     Year(ErstedDatum) as Year,  // this creates a new field called Year

     EuroNet

From <>;

Now take Year as dimension member in the chart and in the expression - =Sum(EuroNet) , and check 'Relative'.

2 Replies
MVP
MVP

Re: Show revenue per year / Age of artikels of revenue

Try something like this:

In the script:

Load

      Artikel,

     ErstedDatum,

     Year(ErstedDatum) as Year,  // this creates a new field called Year

     EuroNet

From <>;

Now take Year as dimension member in the chart and in the expression - =Sum(EuroNet) , and check 'Relative'.

Not applicable

Re: Show revenue per year / Age of artikels of revenue

Yes, this is exactly I was looking for....

Thanks

Community Browser