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
kettyterra
Regular Visitor

Somar valores de uma coluna baseada na análise de outra coluna(datas).

Bom dia!

 

Tenho uma tabela com os seguintes dados:

 

TURNO | DATA

10 | 01/08/2018

10 | 01/08/2018

10 | 01/08/2018

20 | 06/08/2018

20 | 06/08/2018

10 | 10/08/2018

10 | 10/08/2018

 

Quero somar a coluna TURNO apenas uma vez para cada dia, por exemplo

 

10 | 01/08/2018 - SOMA

10 | 01/08/2018 - NÃO

10 | 01/08/2018 - NÃO

20 | 06/08/2018 - SOMA

20 | 06/08/2018- NÃO

10 | 10/08/2018 - SOMA

10 | 10/08/2018 - NÃO

 

Ou seja, se repetir a data, não somar.

 

Podem me ajudar?

 

Obrigada

1 REPLY 1
v-lili6-msft
Community Support
Community Support

Hi@ kettyterra

After my research, you can do these follow my steps like below:

Step 1:

Add index column in Edit Queries

1.png

Step 2:

Add a calculate column as below:

Column = IF(CALCULATE(MIN(Table1[Index]),FILTER(Table1,Table1[DATA]=EARLIER(Table1[DATA])&&Table1[TURNO]=EARLIER(Table1[TURNO])))=Table1[Index],"SOMA","NÃO")

Result:

2.png

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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