Skip to main content
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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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 ??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful