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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AmiraBedh
Super User
Super User

Duplicate result while adding a measure

I have the following tables  :

  • Dim Client
  • Dim Contract
  • Dim Account
  • Fact Ledger
  • d_balance_mappings

     

    the relationships :

    • Dim Client to Dim Contract 1 to many / Cross filter direction Single from Dim Client to Dim Contract
    • Dim Client to Dim Account : 1 to many / Cross filter direction Single from Dim Client to Dim Account
    • Dim Account to Fact Ledger : 1 to many / Cross filter direction Both
    • Fact Ledger to d_balance_mappings : many to 1 / Cross filter direction both

       

      and I have these measures :

       

 

Account Principal Amount = CALCULATE([Ledger Total Amount],d_balance_mappings[Transaction Name] = "Account Principal Amount")


Ledger Total Amount = SUM( 'Fact Ledger'[Ledger Amount] )

 

 

 

 

When I build a table visual containing :

  • Client Id from Dim Client
  • Contract Type from Dim Contract
  • Client Name from Dim Client
  • Account Principal Amount (the measure)

     

    Client id       Contract Type    Client name      Ledger Amount
    123               Freelance            ABC                  1171378
    123               CDI                       ABC                  1171378

     

    So as you see I have duplicate rows it is like a cartesian product while for this Client Id the contract type is only Freelance.

     

    image001.png


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
1 ACCEPTED SOLUTION
miTutorials
Super User
Super User

Change the filter direction between Dim Client and Dim Contract to Both and give it a try!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @AmiraBedh 

 

@miTutorials Thank you very much for your prompt reply.

 

Can you tell me if your problem is solved? If yes, please accept it as solution.

 

Regards,

Nono Chen

miTutorials
Super User
Super User

Change the filter direction between Dim Client and Dim Contract to Both and give it a try!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.