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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Distinct Count in new Column show blank result in table

Hi All, I have a distinct count "New column"

distinctcount__ = CALCULATE(DISTINCTCOUNT(HistoricalBO[Index])). It should count all index rows that in 2020, but it shows blanks(see the picture below)
Capture.PNG
I tried to use new measure. it worked. But I need to be new column for further calculation.
 
Thank you all.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please delete that calculated column and try to recreate a new calculated column with below formula:

distinctcount__ =
CALCULATE (
    DISTINCTCOUNT ( HistoricalBO[Index] ),
    FILTER (
        'HistoricalBO',
        'HistoricalBO'[Year] = EARLIER ( 'HistoricalBO'[Year] )
    )
)

distinctcount.JPG

If the above one still get blank values, please provide some sample data in your model(exclude sensitive data). Thank you.

Best Regards

Rena

View solution in original post

6 REPLIES 6
camargos88
Community Champion
Community Champion

@Anonymous ,

 

Can you provide more examples of your dataset ?



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

@camargos88 
Three columns. year, item , index( as a unique row reference)

I want to get how many items in a year. so I counted the index in a new column.

distinctcount__ = CALCULATE(DISTINCTCOUNT(HistoricalBO[Index]))
Year     Distinctcount
2020  _nothing show_

@Anonymous ,

 

It maybe be necessary take a look at your pbix file to check the modeling, your measure should work.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

@camargos88  only one table , 3 columns, no data model applied.  no filter applied in the page. 

Capture.PNG

Anonymous
Not applicable

Hi @Anonymous ,

Please delete that calculated column and try to recreate a new calculated column with below formula:

distinctcount__ =
CALCULATE (
    DISTINCTCOUNT ( HistoricalBO[Index] ),
    FILTER (
        'HistoricalBO',
        'HistoricalBO'[Year] = EARLIER ( 'HistoricalBO'[Year] )
    )
)

distinctcount.JPG

If the above one still get blank values, please provide some sample data in your model(exclude sensitive data). Thank you.

Best Regards

Rena

@Anonymous ,

 

Can you share this pbix ?



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors