Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Creating a custom measure

I am working with a data set that shows how where the prescription order originated from (column RPORDORIG); this column has the following entries: "E" for electronic, "W" for written, "P" for phone, "V" for Verbal, "O" for outpatient and then several blanks.

 

I need to create a custom measure to display (with a gauge visual) the percent of how many orders out of all of these order origins were "E" electronic. AKA the "E" orders will be the numerator and all orders in total will be the denominator. 

I tried to create a measure using the CALCULATE(COUNTROWS(Table,' Column')) measure but it didn't work. Not sure what I'm doing wrong or if I should be doing something different. 

 

Is there a way to only include the "W" "P" & "V" orders in the denominator, instead of all the orders?? 

 

 

 

  •  

    Denominator =
    CALCULATE (
        COUNTROWS ( 'MD Master Query CPOE' ),
        'MD Master Query CPOE'[RPORDORIG] IN { "W", "P", "V" }
    )
    

     

3 Replies

  •  

    Denominator =
    CALCULATE (
        COUNTROWS ( 'MD Master Query CPOE' ),
        'MD Master Query CPOE'[RPORDORIG] IN { "W", "P", "V" }
    )
    

     

  • Hi, Anonymous 

    For Denominator, try the below.

     

    Denominator = countrows (only table name)

     

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster.