Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Need help in dax

Hello there,   I am looking for help in Dax, I need to perform aggregation(sum) based on the product with an explicit filter condition.   Sample Data: Product Value Trendy Apple 2000 Y...
  • amitchandak's avatar
    5 years ago

    Anonymous , Try like

    Measure = sumx(Sheet1,SWITCH(TRUE(),Sheet1[Product]="Apple" && Sheet1[Trendy]="Yes", Sheet1[Value],
    Sheet1[Product]="Orange" && Sheet1[Trendy]="No",Sheet1[Value],
    Sheet1[Product] in {"Orange","Apple"} , blank(),
    Sheet1[Value])
    )