Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Awais-Ashraf
Contributor
Contributor

Max Year max Month

Hello !

i am facing this issue where id write this expression 

Sum({<[Year]={$(=Max([Year]))},[Month]={$(=Max(Month))}>}[Sales Amount]) 

i get "0" as output but when i write it as 

Sum({<[Year]={$(=Max([Year]))},[Month]={$(=MaxString(Month))}>}[Sales Amount])

i get the desired output but when i want to have the output for Last month and 
Sum({<[Year]={$(=Max([Year]))},[Month]={$(=MaxString(Month)-1)}>}[Sales Amount])

i dont see any output. as we cannot subtract int from String. 
Please Help..
 

 

Labels (2)
1 Reply
andoryuu
Creator III
Creator III

You should delete this duplicate question when you have the opportunity.