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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
DeividDrr
New Member

Total Distinct Sum of a measure

Olá amigos, preciso de uma ajuda com total distinto de uma medida.

 

Abaixo está a tabela

coluna1         Coluna2

A                      10

B                       20

A                       10

C                       30

D                       20

 

A saída desejada seria 80, pois A repete e de só deve ser considerado uma vez

 

Como posso realizar essa soma distinta?

 

This is the measurement I'm currently using

RevAnt = 

 var risco = [RiscoSacadoGroup]

 var ref = CALCULATE(SUM(Estoque[%Referencia]),GROUPBY(Estoque,Estoque[DOC_SACADO_Raiz]))

 retornar

ref * risco

 

DeividDrr_0-1679414056186.png

 

this is my table

DeividDrr_1-1679414101538.png

 

 

 

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @DeividDrr 

please try

RevAnt =
SUMX (
SUMMARIZE (
Estoque,
Estoque[DOC_SACADO_Raiz],
"Referencia", MAX ( Estoque[%Referencia] )
),
[Referencia]
) * [RiscoSacadoGroup]

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @DeividDrr 

please try

RevAnt =
SUMX (
SUMMARIZE (
Estoque,
Estoque[DOC_SACADO_Raiz],
"Referencia", MAX ( Estoque[%Referencia] )
),
[Referencia]
) * [RiscoSacadoGroup]

Muito Obrigado! Deu tudo certo!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.