Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Expression Not Working in pivot table

Hi Dear Experts,

=

if(Count({<Month=,RAG_RATING_CD={'R'}, MonthYear={">=$(=date(MonthStart($(vMonth)),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}RAG_RATING_CD)=1

and

Count({<Month=,RAG_RATING_CD={'R'},  MonthYear={"$(=Date($(vMonth)-10,'MMM YY'))"}>} RAG_RATING_CD)=1

and

Count({<Month=,RAG_RATING_CD={'R'},  MonthYear={"$(=Date($(vMonth)-50,'MMM YY'))"}>} RAG_RATING_CD)=1,

Count({<Month=,RAG_RATING_CD={'R'}, MonthYear={">=$(=date(MonthStart($(vMonth)),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}RAG_RATING_CD))

I have one expression its not working in pivot table, the same expression working fine in list box

i have used same dimension in pivot and list box

can some one help me what is the error, for reference please find below image

Thanks In Advance

Niranjan

1 Solution

Accepted Solutions
Kushal_Chawda

=sum(aggr(if(Count({<Month=,RAG_RATING_CD={'R'}, MonthYear={">=$(=date(MonthStart($(vMonth)),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}RAG_RATING_CD)=1

and

Count({<Month=,RAG_RATING_CD={'R'},  MonthYear={"$(=Date($(vMonth)-10,'MMM YY'))"}>} RAG_RATING_CD)=1

and

Count({<Month=,RAG_RATING_CD={'R'},  MonthYear={"$(=Date($(vMonth)-50,'MMM YY'))"}>} RAG_RATING_CD)=1,

Count({<Month=,RAG_RATING_CD={'R'}, MonthYear={">=$(=date(MonthStart($(vMonth)),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}RAG_RATING_CD)), PivotTableDimension))

View solution in original post

5 Replies
sunny_talwar

May be this:

=Aggr(

if(Count({<Month=,RAG_RATING_CD={'R'}, MonthYear={">=$(=date(MonthStart($(vMonth)),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}RAG_RATING_CD)=1

and

Count({<Month=,RAG_RATING_CD={'R'},  MonthYear={"$(=Date($(vMonth)-10,'MMM YY'))"}>} RAG_RATING_CD)=1

and

Count({<Month=,RAG_RATING_CD={'R'},  MonthYear={"$(=Date($(vMonth)-50,'MMM YY'))"}>} RAG_RATING_CD)=1,

Count({<Month=,RAG_RATING_CD={'R'}, MonthYear={">=$(=date(MonthStart($(vMonth)),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}RAG_RATING_CD)), Metric)

Kushal_Chawda

=sum(aggr(if(Count({<Month=,RAG_RATING_CD={'R'}, MonthYear={">=$(=date(MonthStart($(vMonth)),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}RAG_RATING_CD)=1

and

Count({<Month=,RAG_RATING_CD={'R'},  MonthYear={"$(=Date($(vMonth)-10,'MMM YY'))"}>} RAG_RATING_CD)=1

and

Count({<Month=,RAG_RATING_CD={'R'},  MonthYear={"$(=Date($(vMonth)-50,'MMM YY'))"}>} RAG_RATING_CD)=1,

Count({<Month=,RAG_RATING_CD={'R'}, MonthYear={">=$(=date(MonthStart($(vMonth)),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}RAG_RATING_CD)), PivotTableDimension))

sunny_talwar

From the looks, OP seems to be using this as a dimension. But you are right, if this is an expression, then he might need to add out aggregation such as Sum

Kushal_Chawda

Yes, Over sum have to be there to display the total

NavinReddy
Creator II
Creator II
Author

Thank you both of you its working

Best Regards,

Niranjan