Forum Discussion

manojnikam3008's avatar
manojnikam3008
Frequent Visitor
5 years ago

DAX Query - Help Required

Hi Experts,

 

I am stuck with this query which is working for similar calculation in the same table but when i change the 'search value' to Opex, it does not give me any result and shows blank value.

 

Table Names - Timesheet, User and Task

 

DAX Query which is working for Capex Sum = 

 

Capex Sum = CALCULATE((SELECTEDVALUE('Timesheet (62)'[Hours])*SELECTEDVALUE('User (59)'[Blended Rate])/SELECTEDVALUE('User (59)'[Per Day Hours])),'Task (61)'[Task cost type]="Capex")
 
DAX Query which is not showing any results for Opex Sum = 
Opex Sum = CALCULATE((SELECTEDVALUE('Timesheet '[Hours])*SELECTEDVALUE('User '[Blended Rate])/SELECTEDVALUE('User '[Per Day Hours])),'Task (61)'[Task cost type]="Opex")
 
I am getting circular dependency error while accessing the same columns that were used in Capex formula. Please help me how to deal with it.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi manojnikam3008 ,

     

    This is a good refresher on circular dependencies:  Understanding circular dependencies in DAX - SQLBI

     

    To my knowledge,If you are trying to have two calculated columns that contain measures that are also based on that table, then it is not supported by Power BI.
    So you need to tweak the formula so that the measures are different in two tables.

     

    Please try to follow the troubleshooting tips in this article: FIX: Power BI error A circular dependency was detected

     

    If it does not make sense, please share your pbix file after removing sensitive data to help us clarify your scenario.

     

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi manojnikam3008 ,

     

    Could you tell me if my post helps you a little? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.

     

    Hope to hear from you‌‌😀

     

    Best Regards,
    Eyelyn Qin

     

    • manojnikam3008's avatar
      manojnikam3008
      Frequent Visitor

      Hi Eyelyn9,

       

      Thanks for your response! I have tried this but it did not work me, but now, I'm not adding these two columns separately instead using a single column without bifurcation.

       

      Thanks,

      Manoj Nikam

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi manojnikam3008 ,

         

        Please  share me with your pbix file after removing sensitive data to help us clarify your scenario.

         

        Best Regards,
        Eyelyn Qin