Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Giovane
Creator
Creator

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
Anil_Babu_Samineni

Expression seems works. Can you desribe the variable

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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

if you have a date [Date] field maybe

=Sum(

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

VPWMC.VALTOTAL)

Giovane
Creator
Creator
Author

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

tresesco
MVP
MVP

Try like:

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

Anil_Babu_Samineni

Or May be change LET to SET ??

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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
Creator
Creator
Author

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.

marcus_sommer

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

- Marcus

Anil_Babu_Samineni

Would you able to share sample application?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)