Forum Discussion

iteronsid's avatar
iteronsid
New Member
3 years ago
Solved

Conditional reference to measures/options

Hello friends, Relatively new to Power BI, business requirement relates to below sample scenario:   Have 2 measures: Coverage = Count(Deals), Product = distinctCount(Deals)   Based on the data ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    In dax there is no else if but we csn put an if inside an if that acts like an else if so you can get 

     

    If(max(table[continent]) = "Asia", [coverage],IF(max(table[continent]) = "America",[product],Blank()))

     

    If(max(table[continent]) = "Asia", [coverage],IF(max(table[continent]) = "America",[product],0))

     

    If you want blank for none, use first measure if you want a 0 ,or none use second measure ,or if you have a measure already created for none then just put it instead of 0 or blank()