Forum Discussion
yve214
Helper III
4 years agoCan't get the recent Date Values
Hi there, I am trying to get the recent date value for the table below. I have tried the max and lastdate function but I cant seem to get the results i am expecting. I was able to get a se...
- 4 years ago
Hello yve214.
I was able to get this to work by creating a new table with the following DAX:
New table = ADDCOLUMNS( SUMMARIZE( 'Table', 'Table'[Emp_ID], 'Table'[Interval] ), "Effective Date", CALCULATE( MAX( 'Table'[Effective_Date] ) ), "Score", CALCULATE( MAX( 'Table'[Score] )), "ID", CALCULATE( MAX( 'Table'[ID] ) ) )I created a .pbix file that you can download here.
-Steve - 4 years ago
Hi yve214. Ah, I think understand now. See if this works for you:
Count of Emp IDs = CALCULATE ( DISTINCTCOUNT ( 'Table'[Emp_ID] ), FILTER ( 'Table', VAR CurrentRowEmpID = 'Table'[Emp_ID] RETURN VAR IntervalZeroEffectiveDate = CALCULATE ( MIN ( 'Table'[Effective_Date] ), ALL ( 'Table' ), 'Table'[Interval] = 0 && 'Table'[Emp_ID] = CurrentRowEmpID ) RETURN 'Table'[Interval] = 6 && 'Table'[Effective_Date] > IntervalZeroEffectiveDate ) )
emjp
4 years agoFrequent Visitor
I am not sure if Power BI is the best choice for this task. The result can be easily achieved in excel with a slicer.
...
my Power BI Version, without a DAX Expresion