Forum Discussion

sdhn's avatar
sdhn
Icon for Responsive Resident rankResponsive Resident
4 years ago
Solved

Merge Tables & Counts

Hello All,

 

I have 5 source files on same folder.

I used Get Data -- Folder options to merge all files onto one file called Source. 

 

I need to counts rows for each file.

 

 Following measure counts all rows togather  (Count all 5 files rows):

Source Counts  = COUNTROWS(ALLSELECTED('Source'))-1
 
I want to counts rows for each file.
 
OMP
40
 
ABC
8
 
XYZ
10
 
AEIOU
22
 
I have follwing sample columns
 
Source.NameServiceEsclation TeamCreatedOwner
OMPTelephonetest01/01/2022AB
ABC911test112/01/2021CD
XYZ211FF01/02/2022YZ
AEIOU007Pol12/31/2021UV

 

 help will be appreciated.  Thanks 

  • sdhn  if i have a table like this

     

    The above measure gives me this

     

     

     

6 Replies

  • smpa01's avatar
    smpa01
    Icon for Community Champion rankCommunity Champion

    sdhn  try this

    measure = CALCULATE(COUNT(tbl[Source.Name]),ALLEXCEPT(tbl,tbl[Source.Name]))
    • sdhn's avatar
      sdhn
      Icon for Responsive Resident rankResponsive Resident
      measure = CALCULATE(COUNT(tbl[Source.Name]),ALLEXCEPT(tbl,tbl[Source.Name]))

       

      Source.Name is the column name. It is giving me a total row counts of all files. I want each file separately.   Thanks 

      • smpa01's avatar
        smpa01
        Icon for Community Champion rankCommunity Champion

        sdhn  if i have a table like this

         

        The above measure gives me this