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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

DISTINCTCOUNT column Filtered by TRUE or FALSE

Hi All,

 

Column [Order] = Original Data Set, contains duplicates, type whole number.

Column [TECO] = type TRUE/FALSE, added in the query.

I need to FILTER column [TECO] for TRUE and then DISTINCTCOUNT column [Order] so that I have a unique count of [Order] = TRUE... no count of duplicate [Order].

 

Order            TECO

401103218TRUE
401103220FALSE
401103222FALSE
401103227TRUE
401103471TRUE
401103471TRUE

 

This is the formula that I wrote:

 

=CALCULATE(DISTINCTCOUNT('tbl1'[Order]),FILTER('tbl1',[TECO EPAD]=TRUE))

 

I thought this was working but after checking it is returning a much higher number than it should. I have tried and continue to try various combinations of functions but it either returns an incorrect number or it is an illegal combination.

 

Any help appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

OK... I apologise if you are looking into this issue for me... it's taken me all day but it was a mistake in my relationship model. Sorry!!!!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

OK... I apologise if you are looking into this issue for me... it's taken me all day but it was a mistake in my relationship model. Sorry!!!!

Ah, no worries. I'm just glad you solved it

Gordonlilj
Solution Sage
Solution Sage

Hi,

 

Are you creating a measure or a calculated column?

If it's a calculated column, make it a measure instead

Anonymous
Not applicable

Hi Gordonlilj,

It is a measure not a column.

Regards,

Moby

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.