Forum Discussion
Latest Revision for Each Proposal Number
- 5 years ago
Hi Matt_Mohawk ,
You can create a calculated column and use it as a filter in bar chart.
Column = var NewRevision = CALCULATE( MAX('Table'[Revision #]), FILTER( 'Table', 'Table'[Proposal #] = EARLIER('Table'[Proposal #]) ) ) var result = IF( 'Table'[Revision #] = NewRevision, 1, 0 ) return resultIf the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Matt_Mohawk ,
Try the following formula:
Measure =
var NewRevision =
CALCULATE(
MAX('Table'[Revision #]),
FILTER(
ALL('Table'),
'Table'[Proposal #] = MAX('Table'[Proposal #])
)
)
var result =
IF( MAX('Table'[Revision #]) = NewRevision, 1, 0 )
return
IF(
HASONEVALUE('Table'[Proposal #]),
result,
DISTINCTCOUNT('Table'[Proposal #])
)This is my PBIX file.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-kkf-msft ,
Thank you for the measure. Sorry it took so long for me to respond. I tried this out and it works great if I have it in a table. The problem that I am running into is that I want it to be able to be used as a filter in a bar graph. Is there a way to make it do that as well?
- v-kkf-msft5 years ago
Community Support
Hi Matt_Mohawk ,
You can create a calculated column and use it as a filter in bar chart.
Column = var NewRevision = CALCULATE( MAX('Table'[Revision #]), FILTER( 'Table', 'Table'[Proposal #] = EARLIER('Table'[Proposal #]) ) ) var result = IF( 'Table'[Revision #] = NewRevision, 1, 0 ) return resultIf the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Matt_Mohawk5 years ago
Helper II