Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Giovane
New Contributor III

The expression simple doesn't work !!!

Hi, fellows.

I have this expression:


=Sum({1<[Mês Ano_WMC] = {">= $(vMesAnoPeriodoInicial)"} >} VPWMC.VALTOTAL)

The field [Mês Ano_WMC] means the Month Year of a date, such as apr 2017.

The content of the variable vMesAnoPeriodoInicial is, at this time apr 2016.

The field VPWMC.VALTOTAL means the sale's value of a specif order.

I have sales after apr 2016. When I execute the same sum by other ways, I reach the right result. But, the result of the expression above is zero.

Does someone know what is happening?

In time, I'm in Brazil.

Thanks a lot !!!

Giovane

8 Replies

Re: The expression simple doesn't work !!!

Expression seems works. Can you desribe the variable

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)
MVP
MVP

Re: The expression simple doesn't work !!!

if you have a date [Date] field maybe

=Sum(

{1<[Date]={">=$(=Date(Date#('$(vMesAnoPeriodoInicial)', 'MMM YYYY')))"} >}

VPWMC.VALTOTAL)

Giovane
New Contributor III

Re: The expression simple doesn't work !!!

Joining both tips, I built the simple model bellow. First, we have the script. Second, the table as the result of the load statement. And third, three expressions that act over the data model. The second one, using IF statement, means the right result. But, first, and third expressions, that use set analysis, make no sense. Can you help me now about what is happening in the first an third expressions?

SetAnalysis.jpg

MVP
MVP

Re: The expression simple doesn't work !!!

Try like:

Sum({1<DATA={'>=$(vDataPeriodoinicial)'}>} VPWMC.VALTOTAL)

Re: The expression simple doesn't work !!!

Or May be change LET to SET ??

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)
Giovane
New Contributor III

Re: The expression simple doesn't work !!!

None of the tips you have done seem to work to solve my issue. I'm concluding that the combination between date, variables, and set analysis syntax, simple don't work.

MVP & Luminary
MVP & Luminary

Re: The expression simple doesn't work !!!

Try this: Sum({<DATA={">='$(vDataPeriodoinicial)'"}>} VPWMC.VALTOTAL)

- Marcus

Re: The expression simple doesn't work !!!

Would you able to share sample application?

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)