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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MarkEden
Frequent Visitor

Filter for customers with single product

Hi All,

 

Im struggling with what seems like it should be very simple. I have the below chart that shows insurance customers segmented by premium bands. I need to add a filter to this so that it includes only customers who have 1 policy. 

I have verified the total accounts and total placements figures are correct however if I add the numbers in the chart they total approx 1,500 which is obviously incorrect. 

There can be multiple transactions (and so rows of data) per policy so I believe it is calculating based on transactions so need to find a way to group transactions into a single policy. I've tried versions of summarize, groupby, true/false but can't seem to get it right.

My data model has a transaction fact table and policy type dim table connected by a one to many relationship.

 

Any guidance would be highly appreciated.

 

MarkEden_0-1687416223635.png

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @MarkEden ,

 

You can count how many policy a customer has using a formula similar to below.

=
CALCULATE (
    DISTINCTCOUNT ( 'table'[policy] ),
    ALLEXCEPT ( 'table', 'table'[customer] )
)

Instead of counting the transactions, count the unique policy.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @MarkEden ,

 

You can count how many policy a customer has using a formula similar to below.

=
CALCULATE (
    DISTINCTCOUNT ( 'table'[policy] ),
    ALLEXCEPT ( 'table', 'table'[customer] )
)

Instead of counting the transactions, count the unique policy.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian thank you. I needed to tweak it slightly to fit the x axis category but it got it working. Appreciate your help

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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