Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

WHERE statement in power bi

Does power bi have a where statement like in SQL?  Example:  sum_C =sum(target_values) where product= "C"; I want to put a condition in my visual where athe sum of target values is returned but on...
  • VahidDM's avatar
    4 years ago

    Hi Anonymous 

     

    Try this:

     

    Measure = Calculate ( SUM ( Table[target_values] ), Filter( Table , Table[product] = "C" ) )

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/