Forum Discussion

AndreeaPopescuX's avatar
AndreeaPopescuX
Regular Visitor
1 year ago
Solved

DAX average days without plant contamination

Hi Community!   I'm really scratching the back of my head with this one.  This is the table I have. I have to calculate the average number of days in which there has been no contamination in the f...
  • v-ssriganesh's avatar
    v-ssriganesh
    1 year ago

    Hello AndreeaPopescuX,
    Thank you for sharing your scenario and expected outcome.

    I have reproduced your scenario in Power BI Desktop using your sample logic for consecutive contamination-free days (EB_COUNTER) and the EB flag. By following your requirements, I set up the table and constructed the necessary DAX calculations. I confirm that the average days without contamination result is as you described: 17.5.

     

    For your reference, I have attached the .pbix file so you can review the full setup, including the sample data and DAX measure.

    If I misunderstand your needs or you still have problems on it, please feel free to let us know. 

    Best regards,
    Ganesh Singamshetty.