Forum Discussion

TaroGulati's avatar
TaroGulati
Helper III
9 months ago
Solved

Use relationship total issue

Hi all,    I am trying to find better way to manage different columns in the userelationship function. In my case i have to use columns category sales and categor warehouse when they are in scope. ...
  • v-sgandrathi's avatar
    v-sgandrathi
    9 months ago

    Hi TaroGulati,

     

    After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used the sample data on my end and successfully implemented it.  I am also including .pbix file for your better understanding, please have a look into it:

    Hope this will help you resolve your issue, if you need any further assistance, feel free to reach out.
    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

     

    For your first question, you can handle multiple inactive relationships more efficiently by creating a calculation group rather than relying on a lengthy SWITCH statement. Since Power BI Desktop doesn’t currently allow you to create calculation groups directly, you’ll need to use Tabular Editor for this task. This method lets you activate the necessary relationship dynamically for each measure, making your DAX code cleaner and easier to manage.

    Thank you for using Microsoft Community Forum.