Forum Discussion

Fahad5's avatar
Fahad5
Frequent Visitor
4 years ago

Need help with DAX

Hi All,

 

Please help me with the below DAX.

 

Count Var SFDC % (ODSG Vs ADP) = ([Count Diff SFDC (ODSG Vs ADP)]/VALUES(ADP_COUNT_SFDC[ODSG_Count]))*100

 

I'm getting infinity for this, please help me.

 

amitchandak AlexisOlson parry2k 

 

2 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Please try this instead. VALUES returns a table, so you need to aggregate it.

     

    Count Var SFDC % (ODSG Vs ADP) = ([Count Diff SFDC (ODSG Vs ADP)]/COUNTROWS(VALUES(ADP_COUNT_SFDC[ODSG_Count])))*100
     
    Pat
     
  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Fahad5 

     

    Your ODSG_Count returns only 0, so VALUES(ADP_COUNT_SFDC[ODSG_Count])) only gets the distinct value 0. When you divide a value by 0, you get infinity. 

     

    What exact value should be divide by here? Can you provide some sample data and expected result?

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.