Power BI: Top 5 clients chart wrong due to duplicate clients in multiple branches. RRS feed

  • Question

  • I have requirement to show Gross profit and GP% for top 5 clients.
    I have created the Gross profit bar chart for top 5 clients and its correct as expected. I have concatenated the client and branch columns in table Revenue and used that to get top 5 clients.

    But for GP%, I have created following measure.

    % GP per Client = DIVIDE (    SUM ( Revenue[GrossProfit] ),    CALCULATE ( SUM ( Revenue[GrossProfit]), ALL ( v_DimClient[ClientName]) ))

    I am unable to filter with branch and client concatenated and so getting wrong values. Snapshot of sample data, wrong chart and required correct chart below:

    Here is the relationship of my tables:

    Any input much appreciated.

    Thank you

    Wednesday, July 10, 2019 11:18 AM