The following measure successfully creates a field called Rank that ranks multiple lines within a Quote based on Quote Extended Price. I need to use the table where this is in to send out an NPrinting report with a filter on Rank = 1. However, as far as I can tell, we cannot use a calculated dimension in a filter.
Aggr(Rank(Sum({<[Quote Date]={"$(=Date(Today()-1))"},[Intercompany Flag]={'$(vIntercompany)'}, DateType={'Quote Date'}>}[Quote Extended Price]),2,2), [Quote Number],[%ItemKey])
My next thought was that I have to integrate above aggr/rank code into the other measure called "Amount" that I have in the table in order to limit the data to Rank = 1.
The measure is: Sum({<[Quote Date]={"$(=Date(Today()-1))"},[Intercompany Flag]={'$(vIntercompany)'}, DateType={'Quote Date'}>}[Quote Extended Price])
Please let me know if this is possible or if there is a better way to achieve this.