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

Max YearMonth

Hello,

I want to Show last max month on line chart. but to have different Lines for three years.

for dimension I use this:

Dual(Date(date,'MMM D'),DayNumberOfYear(date)) AS YearDayNo

and as meaasure This:

sum({$<Year = {$(=max(Year))}, Month = {$(=max(Month))}>} FactSoldAmount)

but it doesn't show me anything.

can you Please tell me how can I show This different Three lines on chart for max month.

I want something like this but only last Month

line Chart.PNG

1 Reply
dwforest
Specialist II
Specialist II

if your Month is not a number value, change to:

sum({$<Year = {$(=max(Year))}, Month = {$(=Month(max(Month)))}>} FactSoldAmount)


Set expressions tend not to honor the duality of a date field and will return the number when a numeric function is used.