Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm only using QV since yesterday so most probably this is a newbie question.
In my db I have a month and year field, with some stockvalues. I made a period field :
Date(MakeDate(Year,Month),'MM-YYYY') AS Period, which works fine
Ok, I use this period field now to build a "stock level per month" graph. This gives the following result (= I see what I want to see) :
But now I want to have 2 dashboard charts which gives me the % increase/decrease of
1. current month stocklevel vs last month, and
2. the current month stocklevel vs last year.
so basically i want : sum(this period) / sum(last period) and sum(this period) / sum(same period last year).
how can i do this?
Thanks for the input guys
Hi Jagan, I found by myself what the solution is.
I defined 3 months:
Curr_Mth='10.2011'
Last_Mth='9.2011'
Last_Yr='10.2010'
then, in the current vs last month % diff chart i used the expression,
=(sum(if(Period=$(Curr_Mth),varPrdVal)))/sum(if(Period=
$(Last_Mth),varPrdVal))-1
for the vs last year chart i did the same
=(sum(if(Period=
$(Curr_Mth),varPrdVal)))/sum(if(Period=$(Last_Yr),varPrdVal))-1it works, I'm happy for my first QV day
well, i guess, most probably I'll have to keep a variable "Curr_Mth","Last_Mth" and "Last_Yr" and assign the right period to it, then I can do in my chart Curr_Mth / Last_Mth and so on
but I don't know how to do this in QV.
Thanks
Hi,
Can you uplaod the sample file with data.
Regards,
Jagan.
Hi Jagan, I found by myself what the solution is.
I defined 3 months:
Curr_Mth='10.2011'
Last_Mth='9.2011'
Last_Yr='10.2010'
then, in the current vs last month % diff chart i used the expression,
=(sum(if(Period=$(Curr_Mth),varPrdVal)))/sum(if(Period=
$(Last_Mth),varPrdVal))-1
for the vs last year chart i did the same
=(sum(if(Period=
$(Curr_Mth),varPrdVal)))/sum(if(Period=$(Last_Yr),varPrdVal))-1it works, I'm happy for my first QV day