Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

How to modify the below expression with out using month_n ?

Hi All

How to modify the below expression with out using month_n ?

money(

Sum (if(Month_n=1, $(ColumnDim51)/$(Columndim89))/1000)

, $(vMoneyFormatK))

my next post i will attach my QV Doc

Paul

1 Solution

Accepted Solutions

Re: How to modify the below expression with out using month_n ?

Please select the Year =15 & use below expression

money(

(Sum ({<YearMonth={"$(=date(max(YearMonth),'YY MMM'))"}>} $(ColumnDim51))/sum({<YearMonth={"$(=date(max(YearMonth),'YY MMM'))"}>}$(Columndim89)))/1000

, $(vMoneyFormatK))



Capture.JPG

15 Replies

Re: How to modify the below expression with out using month_n ?

what is Month_n here ? a dimension? could you please elaborate more  

paulyeo11
Valued Contributor II

Re: How to modify the below expression with out using month_n ?

Hi All

Reasons i need to remove month_n is because , my GL Table does not link with month_n

Paul

balrajahlawat
Esteemed Contributor

Re: How to modify the below expression with out using month_n ?

what exactly you want to achieve?

Are you getting any error with the above expression?

paulyeo11
Valued Contributor II

Re: How to modify the below expression with out using month_n ?

Hi Avinash

if month_n=0 mean current month sales amount

if month_n=1 mean previous month sales amount

and so on.

I aware that SET analysis don't require using month_n.

Paul

paulyeo11
Valued Contributor II

Re: How to modify the below expression with out using month_n ?

Hi Balraj

I never get any error . i cannot make use of the field name month_n , because i have sales table and GL table , as GL table does not link with month_n

Paul

paulyeo11
Valued Contributor II

Re: How to modify the below expression with out using month_n ?

i want to achieve the same result $370K with out using month_n field in the exoression.

Re: How to modify the below expression with out using month_n ?

You don't want to use the if statement or you don't want to use month_n?

This seems to be working as well:

=Money(Sum({<Month_n = {1}>}$(ColumnDim51)/$(Columndim89)/1000), $(vMoneyFormatK))

balrajahlawat
Esteemed Contributor

Re: How to modify the below expression with out using month_n ?

I think he dont want to use Month_n  field.

Paul,

It would be better if you can share some sample data for same

paulyeo11
Valued Contributor II

Re: How to modify the below expression with out using month_n ?

Hi sunny

I don't want to use month_n , if using month_n existing expression is working fine.

Paul

Sent from my iPhone

Community Browser