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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Digger
Post Patron
Post Patron

Sum distincts in calculated columns

I can count distinct rows with

 

 

COUNTROWS(
SUMMARIZE(
FILTER(
_payments
,[order_id] = thisOrderID
&& [type] in {"1","yy"}
)
,
[ID])
)
But how get Sum of distincts IDs? in calculated columns not in measures
 
 
6 REPLIES 6
v-eqin-msft
Community Support
Community Support

Hi @Digger ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @Digger ,

 

According to how get Sum of distincts IDs ,please try:

Column = SUMX(VALUES('Table'[ID]),[ID])

Eyelyn9_0-1634261437064.png

 

If it is not your expected output , please provide more detail information(data sample , expected ) to help us clarify your scenario.

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Best Regards,
Eyelyn Qin
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

@Digger , You need a group by for that

 

example

SumX(values(Table[COlumn]), calculate(distinctcount(Table[ID]))

@amitchandak  distinctcount is crashing all report and never complete countings

@Digger , the performance alternate, suggested in some video by guyinacude channel 

 

countx(summarize(Table, Table[ID]),[ID])

 

 

Not able to find the video

@amitchandak  yes, but i need sum not count

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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