Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago
Solved

Count Excesses and Defects with pooled data

Dear, I am writing to you asking for help with the problem I am having. To make it better understood, I made a small query with fictitious data that I think can serve (the query is called Example) ...
  • Ashish_Mathur's avatar
    3 years ago

    Hi,

    Write these measures

    Detour value = SUM(Data[Detour])
    Excesses = COUNTROWS(FILTER(VALUES(Data[Day]),[Detour value]>0))
    Defects = COUNTROWS(FILTER(VALUES(Data[Day]),[Detour value]<0))

    Hope this helps.