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

Dates - Line Chart

Hello -

Can you please help me figure out how to properly represent dates on my line chart?

Default settings:

Dimension:

    • Time_Period

Expression (default settings):

    • Rev Current Year (last 13 month) - =SUM({<month_offset={[>=-13<0]}>}sum_full_sell_price_usd_budget_current)/1000.
    • Rev Last Year (Last 26 month) =SUM({<month_offset={[>=-26<0]}>}sum_full_sell_price_usd_budget_current)/1000.

I also have built a "calendar" dimension table

  • YTD
  • Fiscal YTD
  • QTD
  • MTD
  • Last 13 Month

So now when user launches his report the default settings work as expected, the two lines represent last 13/last 26 month.

But as soon as they click on one of the calendar dimensions (i,e, YTD) the second line doesn't work. What function or formula should i be using? Please help


Thank you!

4 Replies
Not applicable
Author

Hello,

Just specify time fields that don't have to work for this chart, modify your expressions like this:

         Dimension:

    • Time_Period

Expression (example):

    • Rev Current Year (last 13 month)  =SUM({<month_offset={[>=-13<0]}, Year=,Month=, Day=,YTD=>}sum_full_sell_price_usd_budget_current)/1000.
    • Rev Last Year (Last 26 month) =SUM({<month_offset={[>=-26<0]}, Year=,Month=, Day=,YTD=>}sum_full_sell_price_usd_budget_current)/1000.

in above example I set time fields (I supouse you have Year, Month and Day Fields) = nothing (exclude them from selections)  but If you have more just include them in set analysis.

I you can attach an example

Not applicable
Author

Hi Oswaldo,

I am almost there and your explanation makes sense! The formula densest work What else can i try?

Expression:

  • =SUM({<month_offset={[>=-13<0]},fiscal_quarter={[>=-13<0]},{<month_name={[>=-13<0]},{<month_start_date={[>=-13<0]},{<QTD={[>=-13<0}>} sum_full_sell_price_usd_budget_current)/1000.

Thank you!

Not applicable
Author

Hi,

"Field" + "=" + "," should works but you can try with out equal sign and use just dimension name like this:

Rev Current Year (last 13 month)  =SUM({<month_offset={[>=-13<0]}, Year,Month, Day,YTD>}sum_full_sell_price_usd_budget_current)/1000.

I you can attach an example to test with the same qvw

Regards.

Not applicable
Author

The same result, densest like the commas.