Forum Discussion

Maverick423's avatar
Maverick423
Regular Visitor
6 years ago
Solved

Retrieve just one quote

Hello PBI Experts, In my report, I have a table that should contain selected fields from Opportunity and Quotes. I need to retrieve just one or the first quote linked to an entity considering that O...
  • Mariusz's avatar
    Mariusz
    6 years ago

    Hi Maverick423 

     

    You can create a Measure like below, and use it later as Filters in your Table visual.

    Measure = 
    VAR _firstQuoteID = { CALCULATE( MAX( Quotes[qtID] ), ALL( Quotes[qtID] ) ) }
    RETURN 
    CALCULATE(
        COUNTROWS( Quotes ), 
        KEEPFILTERS( TREATAS( _firstQuoteID, Quotes[qtID] ) ) 
    )

    The attached file contains an applied solution.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski