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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
1up
Resolver I
Resolver I

DISTINCT function throws error: *Calculation error in measure'

Hi, I'm trying to find the unique values of a column in a table using DISTINCT function.

 

However when I try to visualize the result in a Table, the following error is thrown: 

 

'Calculation error in measure. A table of multiple values was supplied where a single value was expected'.

 

I have a list of machine names. And would like to count how many there are of each name. Each machine name also has a machine ID which is unique. So I'd like to calculate the amount of Machine IDs for each Machine Name. Thus I tried the DISTINCT function.

 

Ideas? Perhaps there could be multiple solutions to the same problem.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@1up , try

distinctcount(Table[Machine ID])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @1up ,

If the formulas that amitchandak and az38 suggested work, please accept them answers as solutions.

 

If you are still confused about the error, please share the sample data, the formula that you tried and your expected result. Then we will understand clearly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@1up , try

distinctcount(Table[Machine ID])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you, DISTINCTCOUNT did the trick!

 

Any ideas why DISTINCT-function is returning an error? Perhaps it needs to be used with another argument?

az38
Community Champion
Community Champion

hi @1up 

you can just summarize values by adding its into visual as a columns or create a calculated table like

New Table = SUMMARIZE(Table,
Table[Machine Name], "Count Unique ID", COUNT(Table[Machine ID])
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.