Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
deepanshu_chamo1
New Contributor

QVD Total

Hello All

Please help me in the below query.. Is it possible to calculate the running total after loading the data in qvd not in visualization.

I need a running total on the basis of ALID.. which can be filter on CA, MA & DA.

Please help me. I need an urgent help!!

Thanks

15 Replies
santiago_respane
Valued Contributor

Re: QVD Total

Hi,

maybe there's something wrong with your attachment since it doesn't seem to be any.

Please verify in order to help you.

Kind regards,

deepanshu_chamo1
New Contributor

Re: QVD Total

Hello Sir... I just wanted to know if the above query is possible or not.

Attached is the file.. This is the QVD data.. In the visualization I need only three columns..

Monthyear, Actual ALID and Cumulative ALID... It would be great if u can help me.

Please guide

Thanks

deepanshu_chamo1
New Contributor

Re: QVD Total

Hello sir

Please find the attached file

On Oct 26, 2016 12:44 AM, "Santiago Respane" <qcwebmaster@qlikview.com>

vinieme12
Esteemed Contributor II

Re: QVD Total

Can you also post your expected output!

santiago_respane
Valued Contributor

Re: QVD Total

Hi!

now i can se attached.

What do you mean by actual? current day? Month?

Kind regards,

deepanshu_chamo1
New Contributor

Re: QVD Total

Vinnet & Santiago Sir

Please see the attached snapshot..

I need to show in this way..

Please let me know if it is making sense or not

Please help. Thanks

santiago_respane
Valued Contributor

Re: QVD Total

Hi,

Please find attached one of many possible solutions.

Kind regards,

deepanshu_chamo1
New Contributor

Re: QVD Total

Sir somehow in my Qlik Sense desktop QVW file is not showing any sheets.

Can you please help me out to post a Qvf or qvd file calculating the running total on the above sheet..

Thanks a ton in advance..

santiago_respane
Valued Contributor

Re: QVD Total

Hi,

i dont have Sense installed in this machine so i proceed by copying loading script and expressions.

  • Load scrpt:

TEST:

LOAD *,

  YEAR(PGLD) * 100 + MONTH(PGLD)  AS PERIOD

;

LOAD DATE(PGLD) as PGLD,

     CLN,

     DIN,

     MAN,

     ALID FROM [YourFile] (ooxml, embedded labels, table is Sheet1);

  • Chart:
    • create a chart with PERIOD,PGLD,MAN,DIN,CLN as dimensions
    • add an expression as follows:
      • For current period =SUM({<PERIOD={'$(=YEAR(TODAY(1))*100+MONTH(TODAY(1)))'}>}ALID)
        • This will sum all the alid's for current period (201610 you have no data for this period)
      • Variable period
        • Create a variable called v.CurrentPeriod
        • Add an input box pointing to that variable
        • add expression =SUM({<PERIOD={'$(v.CurrentPeriod)'}>}ALID)
          • this will sum all alid's that correspond to the current period variable in YYYYMM format
      • For max period available
        • have a variable called v.MaxPeriod and set the value to
          • =MAX({1}PERIOD)
        • Add an expression =SUM({<PERIOD={'$(v.MaxPeriod)'}>}ALID)
          • This will sum all alid's for the greatest period available

Hope one of this versions helps you.

Kind regards,