Forum Discussion

wcloninger's avatar
wcloninger
Icon for Helper I rankHelper I
3 years ago
Solved

Static measure value that doesn't change

I have a measure named "success rate". It's calculated by failures divided by total number of changes for the change coordinator. I need this measure hard coded for a 12 month rolling success rate. Is this possible? Also, on table 2, it shows the change events for this week, can it show the success rate for the change coordinator on each line?

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi wcloninger ,

    Please have a try.

    Rolling 12 Month Success Rate = 
    CALCULATE(
        DIVIDE(
            COUNTROWS('Table'),
            CALCULATE(
                COUNTROWS('Table'),
                DATESYTD('Table'[Date]),
                ALL('Table')
            )
        ),
        DATESYTD('Table'[Date]),
        FILTER(
            ALL('Table'[Date]),
            'Table'[Date] <= MAX('Table'[Date]) &&
            'Table'[Date] >= DATE(YEAR(MAX('Table'[Date]))-1, MONTH(MAX('Table'[Date])), DAY(MAX('Table'[Date])))
        )
    )

    Then create a column.

    Success Rate = 
    DIVIDE(
        [Failures],
        [Total Number of Changes]
    )

    Then, you can add this calculated column to the table visual to show the success rate for each change coordinator on each line.

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi wcloninger ,

    Please have a try.

    Rolling 12 Month Success Rate = 
    CALCULATE(
        DIVIDE(
            COUNTROWS('Table'),
            CALCULATE(
                COUNTROWS('Table'),
                DATESYTD('Table'[Date]),
                ALL('Table')
            )
        ),
        DATESYTD('Table'[Date]),
        FILTER(
            ALL('Table'[Date]),
            'Table'[Date] <= MAX('Table'[Date]) &&
            'Table'[Date] >= DATE(YEAR(MAX('Table'[Date]))-1, MONTH(MAX('Table'[Date])), DAY(MAX('Table'[Date])))
        )
    )

    Then create a column.

    Success Rate = 
    DIVIDE(
        [Failures],
        [Total Number of Changes]
    )

    Then, you can add this calculated column to the table visual to show the success rate for each change coordinator on each line.

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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

  • forgive me because i'm not an expert in Power Bi, but you have two different calculations here. How does the calculated column have to do with the first measure you posted.