I'm working on creating a measure in DAX to find the MAX and MIN of a specific sum of values. I have three distinct Name (X,Y,Z) and different DateTimeStamp. I want the DAX to first check if the selected Names in the pivot table exist for each DateTimeStamp then calculate the sum of the values and if for a specific DateTimeStamp the Name does not exist then put a BLANK for it. Finally I want to find the MAX and MIN of the calculated sums. My Table with 3 columns and the last column is what I'm looking for
I found a solution using summarize function that is presented below but it only works for a condition without any filter and if I choose my pivot table to filter based on the names (X,Y,Z) it does not work properly.
MINX(
SUMMARIZE(TABLE, TABLE[DateTimeStamp],
"SumValue", IF(COUNT(TABLE[Name])=[NameCount],SUM(Table[Value]),BLANK())),
[SumValue]
)
where NameCount measure is defined as follow:
CALCULATE(DISTINCTCOUNT(TABLE[Name]),ALL(TABLE))


