cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User IV
Super User IV

Re: Average Calculations

Hi @KateC ,

 

We had to add a filter for aver[Program] changing the ALL() to  ALLEXCEPT(). Here is the updated PBIX.  Average
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

 

Total Cumulative hours = 
VAR MaxDate = MAX ( aver[Date] )-- Saves the last visible date
var Hours =
    CALCULATE (
        [Total Hours measure],            -- Computes hours
        aver[Date]<= MaxDate,   -- Where date is before the last visible date
        ALLEXCEPT(  aver,aver[Program] )               -- Removes any other filters from Date allexcept aver[Program]

   )
return Hours

-------------------------------------
Cumulative Count of Customers = 

VAR MaxDate = MAX ( aver[Date] )-- Saves the last visible date
var Counter =
    CALCULATE (
        [Count of customers],            -- Computes customers
        aver[Date]<= MaxDate,   -- Where date is before the last visible date
        ALLEXCEPT( aver,aver[Program] )              -- Removes any other filters from Date allexcept aver([Program]

   )
return Counter




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors