Forum Discussion

sailajaP15's avatar
sailajaP15
New Member
4 years ago
Solved

placeholder error

sample_MPL_caluclattion2 = var IndividualPCPS =CALCULATE ( HEDIS_HPIncentiveConfig[HP_Provider_IndividualPCPS_Estimated_MPL_BONUS],FILTER('HEDIS_Summary_Details -2','HEDIS_Summary_Details -2'[ProvClassCode]="1" )) var FQHCS =CALCULATE ( HEDIS_HPIncentiveConfig[Total_HP_Provider_FQHCs_MPL_Estimated_Bonus],FILTER('HEDIS_Summary_Details -2','HEDIS_Summary_Details -2'[ProvClassCode]="5" )) var Total=CALCULATE(IndividualPCPS+FQHCS)
 
I have wrote this DAX query but i am getting the systax ')' error please help on th
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi sailajaP15 ,

     

    After using "var" in the formula you need to use "return" to return the value.

    Please add:

    return
    total

    at the end of your formula.

    And if [HP_Provider_IndividualPCPS_Estimated_MPL_BONUS] is a column, please wrap it with an aggregate function.

     

    Best Regards,

    Jay

2 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi sailajaP15 ,

     

    It would be helpful if you could share sample data with expected output.But you could try below code:-

     

    sample_MPL_caluclattion2 =
     var IndividualPCPS =
     CALCULATE (SUM(HEDIS_HPIncentiveConfig[HP_Provider_IndividualPCPS_Estimated_MPL_BONUS]),
                FILTER('HEDIS_Summary_Details -2','HEDIS_Summary_Details -2'[ProvClassCode]="1" )
     )
     var FQHCS =
     CALCULATE (SUM( HEDIS_HPIncentiveConfig[Total_HP_Provider_FQHCs_MPL_Estimated_Bonus]),
                FILTER('HEDIS_Summary_Details -2','HEDIS_Summary_Details -2'[ProvClassCode]="5" )
     ) 
     //var Total= IndividualPCPS+FQHCS
     return IndividualPCPS+FQHCS
    

     

     

    Thanks,

    Samarth

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sailajaP15 ,

     

    After using "var" in the formula you need to use "return" to return the value.

    Please add:

    return
    total

    at the end of your formula.

    And if [HP_Provider_IndividualPCPS_Estimated_MPL_BONUS] is a column, please wrap it with an aggregate function.

     

    Best Regards,

    Jay