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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
JHPJ2001
Regular Visitor

Soma da primeira Venda de cada vendedor por mês

ola , ficaria muito grato com a ajuda com asssunto abaixo : 

 

em uma tabela com diversas vendas , Preciso fazer a soma de todas as primeiras vendas dos vendedores , 

1 ACCEPTED SOLUTION
v-huijiey-msft
Community Support
Community Support

Hi @JHPJ2001 ,

 

Please try.

 

Create a calculated column to mark the first sale.

Column1 = 
    VAR a = CALCULATE(
        MIN('Tabel'[Date]),
        ALLEXCEPT('Tabel', 'Tabel'[Sales], 'Tabel'[Monthly Sales])
    )
    RETURN
    IF('Tabel'[Date] = a, 1, 0)

 

The column returns 1 for the first sale and 0 for the others.

 

Create a measure to add up the values of these sales.

Sum Measure = 
    CALCULATE(
        SUM('Tabel'[Sales]),
        FILTER(
            'Tabel'.
            'Tabel'[Column1] = 1
        )
    )

 

Drag and drop to the report page to display as you need.

 

If you have any other queries please feel free to contact me.

 

I would appreciate if you could provide me with sample data, please remove any sensitive data in advance.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

2 REPLIES 2
v-huijiey-msft
Community Support
Community Support

Hi @JHPJ2001 ,

 

Please try.

 

Create a calculated column to mark the first sale.

Column1 = 
    VAR a = CALCULATE(
        MIN('Tabel'[Date]),
        ALLEXCEPT('Tabel', 'Tabel'[Sales], 'Tabel'[Monthly Sales])
    )
    RETURN
    IF('Tabel'[Date] = a, 1, 0)

 

The column returns 1 for the first sale and 0 for the others.

 

Create a measure to add up the values of these sales.

Sum Measure = 
    CALCULATE(
        SUM('Tabel'[Sales]),
        FILTER(
            'Tabel'.
            'Tabel'[Column1] = 1
        )
    )

 

Drag and drop to the report page to display as you need.

 

If you have any other queries please feel free to contact me.

 

I would appreciate if you could provide me with sample data, please remove any sensitive data in advance.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.