Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
varma8998
Contributor III
Contributor III

How to get Month Values using set analysis

Hi All,

By using the below formula I am getting the Max value (September)

(Sum({<Month = {'$(=Date(Max(Date#([Month],'MMMM')),'MMMM'))'}>}[Amount]))

By using the below formula I am getting the Min value (January)

(Sum({<Month = {'$(=Date(Min(Date#([Month],'MMMM')),'MMMM'))'}>}[Amount]))

By using the below formula I am getting the Max -1 value (August)

(Sum({<Month = {'$(=Date(Min(Date#([Month],'MMMM')),'MMMM'))'}>}[Amount]))

I am unable to get the July Value by using set analysis

I am unable to get the June value by using set analysis

and So on...

Below is the Table format:

Month      Place         Amount

January    Canada     1000

February    Mexico     2000

March        USA           3000

April          Australia      4000

May         India             5000

June        India            6000

July       Mexico           7000

August    Mexico          8000

September  USA          9000

Please help me with the correct formula.

1 Solution

Accepted Solutions
raji6763
Creator II
Creator II

hi Varma,

your solution here.

please try below expression :

June month-(Sum({<Month = {'$(=Date(Max(Date#([Month],'MMMM'),4),'MMMM'))'}>}[Amount]))

July month- (Sum({<Month = {'$(=Date(Max(Date#([Month],'MMMM'),3),'MMMM'))'}>}[Amount]))

 

Regards,

raji

 

View solution in original post

4 Replies
tresesco
MVP
MVP

What is your business requirement? Why do you need separate expressions for every months data?

If you need July data you can simply write expression like:

Sum({<Month={'July'}>}Amount)

raji6763
Creator II
Creator II

hi Varma,

your solution here.

please try below expression :

June month-(Sum({<Month = {'$(=Date(Max(Date#([Month],'MMMM'),4),'MMMM'))'}>}[Amount]))

July month- (Sum({<Month = {'$(=Date(Max(Date#([Month],'MMMM'),3),'MMMM'))'}>}[Amount]))

 

Regards,

raji

 

varma8998
Contributor III
Contributor III
Author

Hi

What ever you did it will help in the constant values.

Every time months will change in those scenario if I do it in dynamic that will be helpful to mu business

varma8998
Contributor III
Contributor III
Author

Hi Raji,

Below formula is not working can you please try and let me know again