4 Replies Latest reply: Oct 15, 2011 7:02 AM by Mohammed Siraj

# How to show current month percentage

hi,

As u see the data in attached text file, for Prodct A planned its till december and Prduct A actual its till July which is my current month and every month the data will be updated, i want to have a input box where i can enter the current month name, simultaneously i want a table wch only show current month in it and both the Prduct A planned and Product A Actual value, and a separate text box whc must calculate the percentage (i.e (a/b)-1), for clear understanding i have attached the pic how i want it to show,  Requred urgent help,Thanks

• ###### Re: How to show current month percentage

Hi,  Would something like this work for you?

Thank

Steve

• ###### How to show current month percentage

hi Steve,
i am working on Personal Edition verions of Qlik View so can able to open the file wch you have send it to me, it will be great help if you can write it in notepad or reply me back

• ###### Re: How to show current month percentage

Hi well the graph is just the sum of your two measures against month, then a table with the two measures as :

=sum({<Months= {\$(=[Enter Month Name])} >} [Product A Actual Sales])
Sum ({<Months= {\$(=[Enter Month Name])} >}  [Product A Planned])

then a text field of :

= 'Global Product A is ' & ( num( (sum({<Months= {\$(=[Enter Month Name])} >}   [Product A Planned] )
/
sum({<Months= {\$(=[Enter Month Name])} >} [Product A Actual Sales] ))-1,'0.0%')  ) &' Below Budget for ' & [Enter Month Name] &' 2011'

where [Enter Month Name] is a variable that you set with the month name.

Thanks

Steve

Hi if you really wanted to use set analysis you could do something like this but the question would be why not just use your If statement??

= sum( {<prd_failures={\$(=if(vfact = 1,'*') )}  > } prd_failures)/

sum( {<measurement_failures={\$(=if(vfact = 1,'*') )}  > } measurement_failures)

Thanks

Steve

=sum({<Months= {\$(=[Enter Month Name])} >} [Product A Actual Sales])
Sum ({<Months= {\$(=[Enter Month Name])} >}  [Product A Planned])

= 'Global Product A is ' & ( num( (sum({<Months= {\$(=[Enter Month Name])} >}   [Product A Planned] )
/
sum({<Months= {\$(=[Enter Month Name])} >} [Product A Actual Sales] ))-1,'0.0%')  ) &' Below Budget for ' & [Enter Month Name] &' 2011'

• ###### How to show current month percentage

Hi,

Sorry for the late response, ur script has worked, but i still have one doubt as u seen the text in the blue box, here i have one more condition, if the percentage vlaue is negative dn it mst show "Below" and if Positive then it must show Above, if u can help on these dn it be great