Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

hemanthaanichet
Contributor III

Help me in correcting the expression?

Hi Guys ...

Here is the expression which give correct value only for 2017 Jan rest of the month are not correct

kindly help me on this.......

=num(((

(sum({<PCPM_Version_Desc = {'Adjustment','Actual'},PCPM_SalesType_Key={'1'},PCPM_SalesPeriod = {1},PCPM_Year=p(Year),PCPM_Month=p(Month),PCPM_Calendar_Month=p({<Calendar_Month={'<=$(=max(Calendar_Month))'}>}),PCPM_CP_Team_Flag={'CP','RPL','ORG'},PCPM_Day_Number_In_Month=p({<Day_Number_In_Month = {'<=$(=max(PCPM_Day_Number_In_Month))'}>}),PCPM_Day_of_Week=p({<Day_of_Week=>}),PCPM_RegionDesc={'*'},PCPM_AMHQCode=>}PCPM_Sales_Value))/1000

)

/

count({<PCPM_Month=p(Month),PCPM_Calendar_Month=p({<Calendar_Month={'<=$(=max(Calendar_Month))'}>}),PCPM_RegionDesc={'*'},PCPM_AMHQCode=>}DISTINCT (PCPM_FFName))

/

count({<PCPM_Month=p(Month),PCPM_Calendar_Month=p({<Calendar_Month={'<=$(=max(Calendar_Month))'}>}),PCPM_RegionDesc={'*'},PCPM_AMHQCode=>}DISTINCT (PCPM_Month))),'#,##0')

Regards

Hemanth

5 Replies

Re: Help me in correcting the expression?

Do you select any thing from Day_Number_In_Month

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
hemanthaanichet
Contributor III

Re: Help me in correcting the expression?

No Anil.. in selection Year & month...

actually i start doing  this for my previous thread

https://community.qlik.com/thread/270911

hemanthaanichet
Contributor III

Re: Help me in correcting the expression?

Can you have any idea r suggestion ???? 

Re: Help me in correcting the expression?

May be data was wrong when it comes to my mind because if one month data getting correct could be the reason for that months you may getting more that 1 frequency? Can you check the frequency in List box for that measure?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
hemanthaanichet
Contributor III

Re: Help me in correcting the expression?

I checked it both are correct...

Actually i created two datamodels first is the main one and second one the same as first with change of column names