Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi All,
I am trying to retrieve / filter rows in a report based on a where clause.
The scenario is that each quote (Id) will have an Estimate and when work has been done, will have a Final.
Each Id can additionally have multiple types based on the Rate (Work carried out during Day rates or Night Rates)
I want to be able to filter for a report and retrieve the rows where the Type is Final if the Id has a Final, or retrieve Estimate where it doesn't.
My imported data looks like this:
What I want to display in my report:
Solved! Go to Solution.
Hi @Kcloud ,
I create a sample to have a test. My sample is the same like yours.
Measure:
Filter Measure =
VAR _Type_List =
CALCULATETABLE (
VALUES ( 'Table'[Type] ),
ALLEXCEPT ( 'Table', 'Table'[QuoteId] )
)
RETURN
IF (
"Final" IN _Type_List,
IF ( MAX ( 'Table'[Type] ) = "Final", 1 ),
IF ( MAX ( 'Table'[Type] ) = "Estimated", 1 )
)
Create a table visual , add this measure into visual level filter and set it to show items when value =1.
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Kcloud , Use this measure as visual level filter
countx(filter(summarize(Table, Table[QuoteID], Table[Type], "_1", countx(filter(allselected(Table), Table[ID], max(Table[ID]) && Type = "Final")),, "_2", countx(filter(allselected(Table), Table[ID], max(Table[ID]) && Type = "Estimated"))), (not(Isblank(_1)) && [Type] ="Final") || ((Isblank(_1)) && [Type] ="Estimated")), [QuoteID])
check for not blank. Else create all measure using this code
Unfortunately I am receiving this error when using that measure as a filter:
Hi @Kcloud ,
I create a sample to have a test. My sample is the same like yours.
Measure:
Filter Measure =
VAR _Type_List =
CALCULATETABLE (
VALUES ( 'Table'[Type] ),
ALLEXCEPT ( 'Table', 'Table'[QuoteId] )
)
RETURN
IF (
"Final" IN _Type_List,
IF ( MAX ( 'Table'[Type] ) = "Final", 1 ),
IF ( MAX ( 'Table'[Type] ) = "Estimated", 1 )
)
Create a table visual , add this measure into visual level filter and set it to show items when value =1.
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
96 | |
69 | |
45 | |
40 | |
30 |
User | Count |
---|---|
155 | |
96 | |
60 | |
42 | |
41 |