Forum Discussion

Raul's avatar
Raul
Icon for Post Patron rankPost Patron
2 years ago
Solved

Total different according to a condition

Hello community. I have a matrix where I present by rows the Year and Month of the calendar table and I have also a segmenter by Customer. I want to create a measure that returns the sum of the colu...
  • Daniel29195's avatar
    2 years ago

    Raul 

     

     

    use the following measue : 

     

    measure = 
    sumx( 
    
    values(customer[customer_code]),
    
    switch(
    
    true(), 
    
    customer[customer_code] = 150 ,  calculate ( sum(results[total1]),
    
    calculate ( sum(comparison[total1]))
    )
    )

     

     

    let me know if this works for you . 

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠