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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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