Forum Discussion

jjr333's avatar
jjr333
Advocate I
7 years ago
Solved

Count instances where Aggregated Sum is zero

I have a dimDate table and a related fact table.  The fact table contains gas readings per day per hour. How do I calculate the number of days per year where the average day measure ( [PM10 Ave] ) ...
  • jjr333's avatar
    jjr333
    7 years ago

    Hi Maggie,

    Thank you.

    In the mean time I have used a different approach: GROUPBY() and a virtual table.

    DaysExceeding50 = 
    VAR varPM10DailyAve =
    GROUPBY(Sheet3;'DATETIME TABLE'[date];"varcolAvePM10";AVERAGEX(CURRENTGROUP();Sheet3[pm10]))
    RETURN COUNTROWS(FILTER(varPM10DailyAve;[varcolAvePM10]>=50))
    
    

    Kind regards,

    Julian
    PS: how does one attach a pbix file?