Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

expression error

Hello All,

Please help me, how can i get 3 months values using below expressions. below expression is not workign for me. kindly help me if any modification to the expression.

MonthName(Date) as Metric_Month
vMaxDate=monthname(addmonths(max(Date),0))
vMaxDate2=monthname(addmonths(max(Date),-2))

 

=Count(DISTINCT{<Month=,Metric_Month={">=$(=vMaxDate)<=$(=vMaxDate2)"}>}value_id)
&' ('&
num(num(Count(DISTINCT{<Month=, Metric_Month={">=$(=vMaxDate)<=$(=vMaxDate2)"}>}value_id)/
Count(DISTINCT{<Metric_Month=, Metric_Month={">=$(=vMaxDate)<=$(=vMaxDate2)"}>}Total <Metric_Month>value_id)),'###%')&')'


Thanks & Regards.
NR

1 Solution

Accepted Solutions
Kush
MVP
MVP

@NavinReddy  you can create synthetic data in excel with required output. But looks like your expression should be like below

=Count(DISTINCT{<Month=,Metric_Month={">=$(=vMaxDate2)<=$(=vMaxDate)"}>}value_id)

View solution in original post

5 Replies
NavinReddy
Creator II
Creator II
Author

Any suggestions please 

NavinReddy
Creator II
Creator II
Author

Any suggestions please 

Kush
MVP
MVP

@NavinReddy  can you share sample data with expected output?

NavinReddy
Creator II
Creator II
Author

Hi @Kush  , sorry for my late reply,  i have no access to share the sample data. 

i want to disply 3 months value trend using below expression and variables, any expression edits. 

variables:

vMaxDate=monthname(addmonths(max(Date),0))
vMaxDate2=monthname(addmonths(max(Date),-2))

Expression:

=Count(DISTINCT{<Month=,Metric_Month={">=$(=vMaxDate)<=$(=vMaxDate2)"}>}value_id)

 

Thanks & Regards,

NR

Kush
MVP
MVP

@NavinReddy  you can create synthetic data in excel with required output. But looks like your expression should be like below

=Count(DISTINCT{<Month=,Metric_Month={">=$(=vMaxDate2)<=$(=vMaxDate)"}>}value_id)

View solution in original post