Forum Discussion

M_OConnor's avatar
M_OConnor
Icon for Helper I rankHelper I
6 years ago
Solved

Avoiding 'zero' values in a DAX when you have multiple selected in a filter

Let's say I want to show a bar graph showing Year on Year gross profit for stores broken down into speciic products.   Here's an example of some data I have for three stores. Let's say they sell ch...
  • smarthp29's avatar
    6 years ago

    M_OConnor 

    What if you created another Gross Profit column which only has value if GP Last Year <>0

    IF GP_LY = 0 then 0 else GP

     

    So your 3rd column would be
    Product          GP_Calculation 

    Chainsaw                    0

    Chainsaw                    417

    Chainsaw                    0

     

    And then you this column for calculation