Forum Discussion
Showing Only Max Avg Value on TTM Graph
- 3 years ago
Anonymous , max date would be like
Cred Max CPF =
VAR _SelDate =
MaxX(allselected('Date'), 'Date'[Date])
VAR Result =
Calculate(Calculate(MAX('CPF Average'[Avg]),Map_Product[Reporting Product]="Cred",'Cost Per File'[EOM]>=_PV13&&'Cost Per File'[EOM]<=_PV13,
USERELATIONSHIP('Date'[Date],'Disconnect Date'[Date])), filter( 'Date', 'Date'[Date] =_SelDate))
Return
Resultand min will be
Min Date = eomonth([Cred Max CPF],13)+1 //in case you need date before 13 months
- Anonymous3 years ago
amitchandak My actual solution was this:
Var _SelDate=SELECTEDVALUE('Date'[Date])Var _enddate=EOMONTH(_SelDate,-13)VAR _maxcpf=calculate(max('CPF Average'[Avg]),All('CPF Average'[EOM]),DATESBETWEEN('Date'[Date],_enddate,_SelDate),'CPF Average'[Reporting Product]="Cred")ReturnIf([Cred TTM Avg CPF]=_maxcpf,_maxcpf,Blank())
Anonymous , max date would be like
Cred Max CPF =
VAR _SelDate =
MaxX(allselected('Date'), 'Date'[Date])
VAR Result =
Calculate(Calculate(MAX('CPF Average'[Avg]),Map_Product[Reporting Product]="Cred",'Cost Per File'[EOM]>=_PV13&&'Cost Per File'[EOM]<=_PV13,
USERELATIONSHIP('Date'[Date],'Disconnect Date'[Date])), filter( 'Date', 'Date'[Date] =_SelDate))
Return
Result
and min will be
Min Date = eomonth([Cred Max CPF],13)+1 //in case you need date before 13 months
amitchandak My actual solution was this: