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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Tyron
Frequent Visitor

Removing row data from a calculation

I am trying to remove rows of data from an imported excel file to find the proper count of an enquiry type.

 

I have three columns of Date, ReferenceNo and Enquiry Type. 

 

When an Assigned enquiry type is created, automatically a new row of data is created with an Edit enquiry type. So you get two rows of data for one action.

 

I would like to count only the enquiry type Edit but not the Edit that is associated with the enquiry type Assigned which are related by the duplicated ReferenceNo.

 

Here is a sample table noting the duplicate Reference number. The correct count of Edit should be 6 and not 10.

 

DateReferenceNoEnquiry Type
10/05/2019000-012Assigned
10/05/2019000-012Edit
10/05/2019000-123Assigned
10/05/2019000-123Edit
10/05/2019000-456Edit
10/05/2019000-789Edit
10/05/2019000-963Edit
10/05/2019000-852Edit
10/05/2019000-741Edit
10/05/2019000-753Assigned
10/05/2019000-753Edit
10/05/2019000-951Assigned
10/05/2019000-951Edit
10/05/2019000-486Edit

 

Thanks in advance for any assistance given.

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

This measure works

=COUNTROWS(FILTER(SUMMARIZE(Data,Data[ReferenceNo],Data[Enquiry Type],"ABCD",CALCULATE(DISTINCTCOUNT(Data[Enquiry Type]),ALL(Data[Enquiry Type]))),Data[Enquiry Type]="Edit"&&[ABCD]=1))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks @Ashish_Mathur 

 

Unfortunately I can get that unique number already but don't think I explained myself well enough.

 

Each reference number is worked on by a person. It creates two entries automatically when the person assigns the reference number to another person. So we have a fourth column with the person's name which is repeated based on what reference number they work on. Usually one person assigns reference numbers to other people and that makes their unique edit count high. I am essentially wanting to count reference numbers where the person only edits and not assigned and therefore edited. So counting unique reference numbers but not when they are repeated with Enquiry Type = Assigned.

 

I'd prefer not to go through the Excel file to manually delete the two lines for Assigned and Edit.

 

Hope that makes sense and appreciate any assistance given.

 

 

Anonymous
Not applicable

Why not just remove the duplicates of ReferenceNo?
it will keep the ones with Type Assignes since they are mentioned before the Edit ones. 

The edits will then only be true edits.

The issue I am finding is that with more rows of data I get a number returned but that number is different to manually removing the Edit and Assigned Enquiry Type that share the same Reference No.

 

Thanks for the input so far, appreciated.

Hi,

Unfortunately, i do not think i understand your requirement.  I got the exact result you wanted (as mentioned in your first post).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors