Forum Discussion

Meneghetti's avatar
Meneghetti
New Member
8 years ago
Solved

Help New Measure - SUMIF Equivalent

Hello Guys 

 

First time here, first of all I'm sorry that English is not my native language. I am trying to make a sum of a column only when my product is a "lançamento" in the lançamento column. The example below:

 

MAT Atual -1MAT AtualLançamento 
11Lançamento 
12Lançamento 
34Maduro
56maduro
78Lançamento 
78maduro
   
   
   
MAT Atual -1 lançamentosMAT Atual lançamentos 
911 

 

I'm using the following formula: Soma lanç = SUMX(VALUES(OUTUBRO[Lançamentos]);OUTUBRO[Soma Mat Atual])

 

But does it sum only what is being filtered in the report and not just the "lançamentos" in that column could help with a new formula?

 

Thanks so much 

  • Add a measure  as below, change column name and table name as per your data table.

     

    Sum of Lancamento =
    
    Calculate(
      Sum(Table[MAT Atual]), 
      Filter(
         AllSelected(Table), 
        Table[Lancamento] = "Lancamento"
      )
    )

2 Replies

  • Add a measure  as below, change column name and table name as per your data table.

     

    Sum of Lancamento =
    
    Calculate(
      Sum(Table[MAT Atual]), 
      Filter(
         AllSelected(Table), 
        Table[Lancamento] = "Lancamento"
      )
    )