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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
MahaAli_00
New Member

Calculate distinct count with accurate sum

MahaAli_00_0-1696608985957.png

Hi I want to calculate the distinct count of column "COLL_ACTIVE" which filters out the total "COMM_TARGET%" witha a range but I am getting wrong values I have used multiple Measure to calculate this what I am using right now is 

50%-69.9%(Q) = CALCULATE(DISTINCTCOUNTNOBLANK(MainList[COLL_Active]),FILTER(MainList,MainList[COMM_T%]>=50 && MainList[COMM_T%]<=69.9))+0

'Mainlist' is the table name "COMM_T" it is returning me blank but I have COLL_ACTIVE that has total of more than 50, how should I do it please help 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MahaAli_00 ,

 

What's the difference between [COMM_T%] and [COMM_TARGET%]? Based on my understanding, [COMM_TARGET%] is a column.

To find out a possible solution, I created sample data and a measure. Please refer to

vstephenmsft_1-1696929512032.png

Measure = CALCULATE(DISTINCTCOUNT('MainList'[COLL_Active]),FILTER('MainList',[COMM_TARGET%]>=50&&[COMM_TARGET%]<=69.9))

The measure in the card visual:

vstephenmsft_2-1696929545757.png

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @MahaAli_00 ,

 

What's the difference between [COMM_T%] and [COMM_TARGET%]? Based on my understanding, [COMM_TARGET%] is a column.

To find out a possible solution, I created sample data and a measure. Please refer to

vstephenmsft_1-1696929512032.png

Measure = CALCULATE(DISTINCTCOUNT('MainList'[COLL_Active]),FILTER('MainList',[COMM_TARGET%]>=50&&[COMM_TARGET%]<=69.9))

The measure in the card visual:

vstephenmsft_2-1696929545757.png

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

pradeep_kare12
Resolver I
Resolver I

@MahaAli_00  try this dax function 

 

DebugTable =
SUMMARIZECOLUMNS (MainList[COMM_T%],
"Distinct Count", DISTINCTCOUNTNOBLANK(MainList[COLL_Active])
)

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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