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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
KingBombo
New Member

Why does this DAX calculated column has the same value for every row?

I know that my table must be wack.

 

So simple: trying to do a running total of "Yes" values in the "Automated" column by "created" date in the table "Tests". I have a total of 26 tests that are automated in the entire table. The calculated column keeps putting 26 for every row in the entire column.

 

Running Total of Automated Tests =
CALCULATE(
    COUNT(Tests[Created]),
    FILTER(
        ALL('Tests'),
            Tests[Created] <= MAX(Tests[Created])
            && Tests[Automated]="Yes"
    )
)
2 ACCEPTED SOLUTIONS
VahidDM
Super User
Super User

Hey @KingBombo 

 

Try this:

Running Total of Automated Tests =
VAR _A =
    FILTER (
        Tests,
        Tests[Created] <= EARLIER ( Tests[Created] )
            && Tests[Automated] = "Yes"
    )
RETURN
    COUNTROWS ( _A )

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

 

LinkedIn | Twitter | Blog | YouTube 

View solution in original post

Hey, thanks for the quick reply. This was an interesting method and helped some, but it put values in for rows where the automated flag was blank and no was well for some reason. 

 

I added to your solution to write this:

Running Total of Automated Tests =
IF(Tests[Automated)] = "Yes",
    COUNTROWS(
        FILTER (
            Tests,
            Tests[Created] <= EARLIER ( Tests[Created] )
            && Tests[Automated] = "Yes"
        )
    ),
    BLANK()
)

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hey @KingBombo 

 

Try this:

Running Total of Automated Tests =
VAR _A =
    FILTER (
        Tests,
        Tests[Created] <= EARLIER ( Tests[Created] )
            && Tests[Automated] = "Yes"
    )
RETURN
    COUNTROWS ( _A )

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

 

LinkedIn | Twitter | Blog | YouTube 

Hey, thanks for the quick reply. This was an interesting method and helped some, but it put values in for rows where the automated flag was blank and no was well for some reason. 

 

I added to your solution to write this:

Running Total of Automated Tests =
IF(Tests[Automated)] = "Yes",
    COUNTROWS(
        FILTER (
            Tests,
            Tests[Created] <= EARLIER ( Tests[Created] )
            && Tests[Automated] = "Yes"
        )
    ),
    BLANK()
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.