Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
RichHead1821
Resolver I
Resolver I

Find no of rows, with a filter, where rows have same value in one column, but different in others

I want to achieve something akin to this (this populates a column as true if the number of rows, filtered, is > 1 where the filters in ALLEXCEPT are the same).

 

What I need to find now is similar, except the PolicyReference needs to be the same, but Product OR ProductType OR Term are different. I'm assuming my starting point (trying to amend this) is not a good idea, but I can't see a way to achieve what I need

 
hasPolicyHolderMoreThanOneSameProductWithNODifferences =
IF(
CALCULATE(
COUNTROWS(
FILTER(
factSoldCovers,
factSoldCovers[couldCoverBeEligible2022Offer1] = TRUE()
)
),
ALLEXCEPT(
factSoldCovers,
factSoldCovers[PolicyReference],
factSoldCovers[Product],
factSoldCovers[ProductType],
factSoldCovers[Term]
)
) > 1,
TRUE(),
FALSE()
)
1 ACCEPTED SOLUTION
RichHead1821
Resolver I
Resolver I

I did it in two stages, used the first to ID where they were the same, then checked that in a second stage

View solution in original post

3 REPLIES 3
RichHead1821
Resolver I
Resolver I

I did it in two stages, used the first to ID where they were the same, then checked that in a second stage

amitchandak
Super User
Super User

@RichHead1821 ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

HI, yes, sample data would be single table (factSoldCovers):

factSoldCovers[couldCoverBeEligible2022Offer1] (true or false)
factSoldCovers[PolicyReference] (unique INT)
factSoldCovers[Product] (A, B, C)
factSoldCovers[ProductType] (1, 2, 3)
factSoldCovers[Term] (10 to 99) INT
Hope that helps, sorry it's brief I am in a meeting (all day) 😞

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.