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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
nasirskardu
Regular Visitor

Table Matrix rows repeat when add column

I have simple data model as below 

nasirskardu_0-1696940399222.png

I need to show No of Transactions fro each Tehsil. Tehsils with no transactions should show 0 entry. I created following two versions of measure:

No. of Transactions 2 = 
   var r = COUNTROWS(Transactions)
   return if (r = BLANK(), 0, r)

 

No. of Transactions = 
   var r = CALCULATE( COUNTROWS(Transactions), REMOVEFILTERS(District[District Name]))
   return if (r = BLANK(), 0, r)

when I use this measure with only Tehsil, both give correct answer

nasirskardu_1-1696940797794.png

but when i add District column, it repeat rows:

nasirskardu_2-1696940830813.png

 

Please help to solve issue.

 

2 REPLIES 2
nasirskardu
Regular Visitor

Thanks @DallasBaba for replying. 

I changed cross filter direction of relationship between District & Tehsil tables to "Both" but it did not work.

DallasBaba
Super User
Super User

Hi @nasirskardu 

The district is filtering on Tehsil
You need set the cross-filter cardinality to both directions so the Tehsil can filter on the district.

 

 

dallasbabatunde_0-1696958636157.png

 

Please let me know if this work.

 

Thanks

Babatunde Dallas

 

Thanks
Dallas

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.