Forum Discussion

HassanI's avatar
HassanI
Frequent Visitor
6 years ago

Help with DAX for dynamicly sliced Average

HelloI have a table with header IDs, for each header ID there are multiple rows for each product ID, for each Header ID there is a "Status" column

 

I need help with DAX to Achieve the following:

 

  1. Calculate denominator by counting occurences of "Value1" & "Value2" from status column grouped by header ID
  2. Calculate Numerator by counting occurences of "Value1" from status column grouped by Header ID
  3. Calculate Numerator/Denominator  grouped by header ID
  4. Calculate average of numerator/denominator for step 3 as its multiple values.
  5. be able to slice the value of 4 by date, product, country and multiple other slicers.

How can I achieve this?