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

Don'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.

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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