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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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