Forum Discussion
Finding the max date row between date range and date range is dynamic.
- Anonymous9 years ago
Hi asanand,
You can use below formula to get the max date of each type based on slicer:
Measure: Max Date = var curr=LASTNONBLANK(Sheet4[Column1],[Column1]) Return MAXX(FILTER(ALLSELECTED(Sheet4),[Column1]=curr),[Column2])
Regards,
Xiaoxin Sheng
Hi asanand,
You can use below formula to get the max date of each type based on slicer:
Measure: Max Date = var curr=LASTNONBLANK(Sheet4[Column1],[Column1]) Return MAXX(FILTER(ALLSELECTED(Sheet4),[Column1]=curr),[Column2])
Regards,
Xiaoxin Sheng
Thank you for your help and though it returning me the correct date but when I am trying to sum the flags its not counting it correct and counting the values multiple time. This is what I have done, can you please take a look and advise what's wrong with this. Thanks
YieldPassCount = VAR curr =
LASTNONBLANK (
Dashboard_MCS_YieldReports[Stop_Time],
Dashboard_MCS_YieldReports[Stop_Time]
)
RETURN CALCULATE(SUM(Dashboard_MCS_YieldReports[PassFlag]),FILTER(Dashboard_MCS_YieldReports,(
MAXX (
FILTER (
ALLSELECTED ( Dashboard_MCS_YieldReports ),
( Dashboard_MCS_YieldReports[Stop_Time] = curr )
),
Dashboard_MCS_YieldReports[Stop_Time]
))),GROUPBY(Dashboard_MCS_YieldReports,Dashboard_MCS_YieldReports[SerialNumber],Dashboard_MCS_YieldReports[AssemblyName]))