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
AOD
Helper II
Helper II

count number of rows in table

Hi All, 

Need help 

I have below table as source , I want to create a easure that gives me count of exact matched addresses, where there are multiple rows of exact same address. single row should not be considered.

Address Type 
11, XYZ Lane , Postcode :123CT
11, XYZ Lane , Postcode :123H
11, XYZ Lane , Postcode :123R
5, XYZ Lane , Postcode :124CT
5, XYZ Lane , Postcode :124R
6, XYZ Lane , Postcode :32CT
6, XYZ Land , Postcode :32H
9, XYZ Lane , Postcode :12CT

 

Example Measure -> Exact Match address should be 2 here , 

address 11, XYZ Lane , Postcode :123 and 5, XYZ Lane , Postcode :124 are exact match here with multiple rows. 

 

Can someone please help me in writing the measure?

Thanks in advance. 

 

 

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@AOD,

 

Try this measure:

 

Count Exact Match = 
VAR vTable =
    ADDCOLUMNS (
        VALUES ( 'Address'[Address] ),
        "@Count", CALCULATE ( COUNT ( 'Address'[Address] ) )
    )
VAR vResult =
    COUNTROWS ( FILTER ( vTable, [@Count] > 1 ) )
RETURN
    vResult

 

DataInsights_0-1664044638847.png

 





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

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@AOD,

 

Try this measure:

 

Count Exact Match = 
VAR vTable =
    ADDCOLUMNS (
        VALUES ( 'Address'[Address] ),
        "@Count", CALCULATE ( COUNT ( 'Address'[Address] ) )
    )
VAR vResult =
    COUNTROWS ( FILTER ( vTable, [@Count] > 1 ) )
RETURN
    vResult

 

DataInsights_0-1664044638847.png

 





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

Proud to be a Super User!




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.