Forum Discussion
Anonymous
7 years agoNot applicable
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...
- 7 years ago
Hi Anonymous
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
Community Champion
7 years agoHi Anonymous
Can You create a sample of your data.
- Anonymous7 years agoNot applicable
Hello Mariusz,
Please see below for my test data in a table:
As you can see, I have here two Quotes under 1 Opportunity. The requirement is just to diplay the first Quote if there are 2 or more Quotes linked to an Opportunity. Is it possible to do it using DAX?
Regards,
Maverick423
- Mariusz7 years ago
Community Champion
Hi Anonymous
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.
- Anonymous7 years agoNot applicable
Hi Mariusz,
Thank you ever so much for this. You're a genius!!
It solved my problem instantly:)
Regards,
Maverick423