Forum Discussion
mabdelrahman76
Helper I
4 years agoCalculate max date value from date range
Hi, I have tracking table called "test", i am trying to to display only the most recent values for each group in column “CD_Trading_Id” regarding the value of the max Date modified. I have Date sl...
- Anonymous4 years ago
Hi mabdelrahman76 ,
If you dont want to have constant value for Status , just remove the filter in measure, like:
Measure = var _max=CALCULATE(MAX('Table'[Modified]),FILTER(ALLSELECTED('Table'),[CD_Trading_Id]=MAX('Table'[CD_Trading_Id]))) return IF(MAX('Table'[Modified])=_max,1,0)It will work, please try.
Best Regards,
Eyelyn Qin
mabdelrahman76
Helper I
4 years agoAlso, i am trying differnt another solution is to create summerize table based on the date range selection column "Modified" in the original table "Test" but unfortunatly when i modifiy the range date in the slicer still pickup the max date from the original table, is there anyway to get the new date range inside the summerize table?
MARIZE Tabe =
SUMMARIZE(Test,Test[CD_Trading_Id],
"Modified",calculate(VALUES(Test[Modified]), filter(ALLSELECTED( Test[ID]), Test[id] = max(Test[id]))),
"Noofcase", CALCULATE(VALUES(Test[No. of Cases]),filter(Test,Test[Id]=MAX(Test[Id]))),
"Status",calculate(VALUES( test[Status]), filter(ALLSELECTED( Test[ID]), Test[id] = max(Test[id]))))