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
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
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.

Top Solution Authors