Forum Discussion
DAX Formula
- 2 years ago
Hi,
Try this
Latest due date = calculate(max(Data[Due date]),filter(Data,Data[Date]=earlier(Data[Date])&&Data[Status]=earlier(Data[status])&&Data[Volume]>0))
not clear about this.
What's the expected output based on the sample data you provided?
- ldwf2 years agoHelper V
ryan_mayu...the intent is to create a field that I can use on a visual to show the latest Due Date for every Date & Status combination. So with the small subset in the screenshot, I want to build a visual that shows three columns, the Date, the Status, and the [latest] Due Date, but only one row. So the visual should show one row like this:
- ryan_mayu2 years agoSuper User
ldwf @
you can try this to create a column
last due date = CALCULATE(max('Table'[duedate]),ALLEXCEPT('Table','Table'[Date],'Table'[status]))or you can create a measureMeasure = maxx(FILTER(all('Table'),'Table'[Date]=max('Table'[Date])&&'Table'[status]=max('Table'[status])),'Table'[duedate])- ldwf2 years agoHelper V
Thanks, but this solution gives me the latest date of all the records in the entire result set, not for each combination of Date and Status that appears in the visual