I need to bring the last record of each month hourb
I need to create a variable for current month and last 2 months
Something is wrong to bring the last product of each hour, of each month
How the set analysis should look like below
All Months are being repeated
LET vmonth = MonthName(Today(), 'MM/YYYY');
LET vmonth1 = MonthName(Today()-30, 'MM/YYYY');
LET vmonth2 = MonthName(Today()-60, 'MM/YYYY');
FirstSortedValue([VALORCUSTOMEDIO],-Aggr(Min({<[MesAno]={'vmonth '} >}horab),Produto))
FirstSortedValue([VALORCUSTOMEDIO],-Aggr(Min({<[MesAno]={'vmonth1'} >}horab),Produto))
FirstSortedValue([VALORCUSTOMEDIO],-Aggr(Min({<[MesAno]={'vmonth2 '} >}horab),Produto))
Something is wrong to bring the last product of each hour, of each month