Forum Discussion
SEwing
3 months agoFrequent Visitor
How to use latest date from multiple rows for visualization
I'm trying to create visual for Site Job Completions by month. The data looks like this: Site Job Number Job Completion Date Measure of Completed Sites Dates Count of Sites/Month Alp...
- 3 months ago
you can create a new table and use the new table to display the result
SummaryTable =VAR BaseTable =ADDCOLUMNS (SUMMARIZE ( 'Jobs', 'Jobs'[Site] ),"Max Job Completion Date",VAR HasBlankDate =CALCULATE (COUNTROWS ( 'Jobs' ),KEEPFILTERS ( 'Jobs'[Job Completion Date] = BLANK () ))VAR MaxNonBlankDate =CALCULATE (MAX ( 'Jobs'[Job Completion Date] ),'Jobs'[Job Completion Date] <> BLANK ())RETURNIF (HasBlankDate > 0,BLANK (), -- Max Job Completion Date (Delta = blank)MaxNonBlankDate))RETURNADDCOLUMNS (BaseTable,"Month",VAR MaxNonBlankDateForSite =CALCULATE (MAX ( 'Jobs'[Job Completion Date] ),'Jobs'[Job Completion Date] <> BLANK ())RETURNIF (ISBLANK ( MaxNonBlankDateForSite ),BLANK (),FORMAT ( MaxNonBlankDateForSite, "MMM" ) -- or "MMMM"))pls see the attachment below
v-sshirivolu
3 months agoCommunity Support
Hi SEwing ,
I would take a moment to thank ryan_mayu , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions