Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

Show values in YTD basis?


Hi All,

Currently I am showing the Total Revenue by Quarter in a Bar Graph, means for each Quarter, I have some Revenues.

Now my requirement is to show the Revenue in a YTD basis in a Bar Graphy and compare the both charts.

How to calculate in YTD basis? Please guide.

Let say my table has this values:

 

Quarter

 

Revenue (Mn $)

 

Q1

 

150

 

Q2

 

100

 

Q3

 

120

 

Q4

 

180

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

PFA file for solution.

Regards,

Jagan.

View solution in original post

12 Replies
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Do you have date field or Month Year field apart from Quarter ?

MK_QSL
MVP
MVP

YTD can be calculated by

Dimension

YourDateField

Tick Suppress When Value is NULL

Expression

SUM({$<YourDateField = {'<=$(=Today())'}>}Revenue)

dmohanty
Partner - Specialist
Partner - Specialist
Author

Apart from Quarter, I have a separate field called Month with values like Jan-13, Feb-13, Mar-13....Dec-13

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Manish,

I dont have an exact date field, but have a Month field with values Jan-13, Feb-13, Mar-13....Dec-13.

Could you please show me an example, with sample data shared above?

manojkulkarni
Partner - Specialist II
Partner - Specialist II

If date field is not present, then you can't call the value as YTD. Still want to continue, then using your Month Year field create date & use InYearToDate function to create flag inside your script.

Or you can use expression suggested by Manish...

Not applicable

Hi DMohanty,

You want to show YTD in same graph or seperate graph....

dmohanty
Partner - Specialist
Partner - Specialist
Author

Saranya,

Wanted to show in a separate Graph. But which ever is feasible, is better. Pleas guide.

Not applicable

1.In Quarterwise Revenue graph remove the dimension.

then give the text 'YTD' in AddCalculatedDimension,It will display YTD in seperate graph

2.In Existing Quarterwise Revenue graph,under Presentation tab

enable Show total option,It will display YTD in same graph

Hope it will help......

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi All,

I just have a Quarter field and a Month field (as mentioned above). Still am unable to create a Date field from those and calculate the YTD.

Could someone show with an example please?