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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.