Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
BBHouston
Helper I
Helper I

How do I fix this specific measure for my table (cumulative by month)?

I have the following table visual (you can ignore the "Newly Registered" column): 

Screenshot 2020-11-09 154003.png

I want the "Running Count MONTH" total to be cumulative. So instead of 192-54-4, I want it to show up as 192-246-250. Here is my current measure that is still giving me the above result:

Running Count MONTH = CALCULATE(COUNTROWS('Table1'), FILTER(ALL('Table1'[Date]), MONTH('Table1'[Date]) <= MONTH(MAX('Table1'[Date])) && NOT(ISBLANK('Table1'[Date]))))


What mistake is in my measure and how do I fix it to get the result I want? 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@BBHouston 

The problem is the filter expression, try  use max([date].[month.no]):


Running Count MONTH = CALCULATE(COUNTROWS('Table1'), FILTER(ALLSELECTED('Table1'[Date]), [Date].[Month.no] <= Max([Date].[Month.no]) && NOT(ISBLANK('Table1'[Date]))))


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
V-pazhen-msft
Community Support
Community Support

@BBHouston 

The problem is the filter expression, try  use max([date].[month.no]):


Running Count MONTH = CALCULATE(COUNTROWS('Table1'), FILTER(ALLSELECTED('Table1'[Date]), [Date].[Month.no] <= Max([Date].[Month.no]) && NOT(ISBLANK('Table1'[Date]))))


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_MathurThank you for the reply. Unfortunately, it's giving me the exact same result. I'm guessing i would need to add the MONTH function somewhere there as well? 

jdbuchanan71
Super User
Super User

@BBHouston Give this a try.

Running Count =
VAR _MaxDate = MAX ( 'Table1'[Date] )
RETURN
    CALCULATE (
        COUNTROWS ( 'Table1' ),
        FILTER (
            ALL ( 'Table1'[Date] ),
            'Table1'[Date] <= _MaxDate
                && NOT ( ISBLANK ( 'Table1'[Date] ) )
        )
    )

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.