Forum Discussion

cathoms's avatar
cathoms
Icon for Responsive Resident rankResponsive Resident
5 years ago
Solved

Having trouble with total averages

I am trying to build a dataset/model to analyze the utilization rates of codes for office visits. Established office visits can be coded 99212, 99213, 99214, or 99215. Right now my data model is real...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  cathoms  ,

    This is the data I created:

    Here are the steps you can follow:

    1. Create measure.

     

    Measure =
    DIVIDE(MAX('All_Visits'[99212 Visits]),MAX('All_Visits'[Established Visit Total]))
    Measure 2 =
    VAR _1=
    SUMX(FILTER(ALL('All_Visits'),'All_Visits'[Row labels]=MAX('All_Visits'[Row labels])),[Established Visit Total])
    VAR _2=
    SUMX(FILTER(ALL('All_Visits'),'All_Visits'[Row labels]=MAX('All_Visits'[Row labels])),[99212 Visits])
    RETURN
    DIVIDE(_2,_1)
    Measure 3 = IF([Measure]<[Measure 2],1,0)

     

    2. Result:

    If my answer does not meet your expectations, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

     

    Best Regards,

    Liu Yang

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