Forum Discussion

N_A_S_H's avatar
N_A_S_H
Frequent Visitor
1 year ago
Solved

Measure Not working on Sankey Chart

Hi,

I am doing basic CDR Analysis. I want to use the Sankey Chart to show the flow of communication between common connections only. Common connection is defined as single dimBParty[B-Party] connected to multiple dimAParty[A-Party]. 

My data model has two dimension tables dimAParty and dimBParty connected to CDR fact table. I created a measure to filter the common connections only i.e. count distinct A-Parties per B-Party.

 

 

DistinctAPartyCount = 
CALCULATE(
    DISTINCTCOUNT(dimAParty[A-Party]),
    CDR
)

 

 

 

The measure seems to work fine when I use it as a filter in a matrix visual - DistinctAPartyCount > 1.

However, when I use it to filter the common connections in a Sankey Chart, the chart goes blank.
Link to the "Sample CDR.pbix" file. 
Please help with the correct measure.  Thank you. 

 
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi N_A_S_H ,

     

    Thanks for your reply. I reviewed a while and found that the cause.

    You can observe that it's the gaps caused by issues with the order of your visual fields. The positions of A party and B party are reversed.

    Similarly, your matrix has a row B-Party at the top and a column at the bottom with A-Party. Your filter is to show the value when the count of A-Party is greater than 1.

    It would be more intuitive if you replaced Grand Total with a filter's metric, as follows:

    For each row of the B-Party, the distinctcounting of A-Party with 03004444444 is 1 and will be filtered out. Others greater than 1 will be retained.

    At this point I put A-Party in the row and B-Party in the column, as follows:

    You can see that, A-Party is assigned to each row, so the distinctcounting of A-Party in each row is 1, which is the filter condition when the distinctcounting of A-Party is greater than 1, all rows will be filtered out.

    Summary: This question involves the row context, if you are interested, you can refer to:

    Row context in DAX - SQLBI

    Context in DAX Formulas - Microsoft Support

     

    Best Regards,

    Stephen Tao

     

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

     

4 Replies

  • some_bih's avatar
    some_bih
    Community Champion

    Hi N_A_S_H 

    I dupklicated your Sankey tab and put measure and I do get some figures, not blanks.

    See results below

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi N_A_S_H ,

     

    You should note that your measure is placed as a filter at the visual level.

    Then I tested it, and the measure filter was placed in the matrix, and it was also empty.

    Please provide more details of your issue.

     

    Best Regards,

    Stephen Tao

     

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

     

    • N_A_S_H's avatar
      N_A_S_H
      Frequent Visitor

      Hi Anonymous,

      Please take a look at the second page of the report for the measure output.

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi N_A_S_H ,

         

        Thanks for your reply. I reviewed a while and found that the cause.

        You can observe that it's the gaps caused by issues with the order of your visual fields. The positions of A party and B party are reversed.

        Similarly, your matrix has a row B-Party at the top and a column at the bottom with A-Party. Your filter is to show the value when the count of A-Party is greater than 1.

        It would be more intuitive if you replaced Grand Total with a filter's metric, as follows:

        For each row of the B-Party, the distinctcounting of A-Party with 03004444444 is 1 and will be filtered out. Others greater than 1 will be retained.

        At this point I put A-Party in the row and B-Party in the column, as follows:

        You can see that, A-Party is assigned to each row, so the distinctcounting of A-Party in each row is 1, which is the filter condition when the distinctcounting of A-Party is greater than 1, all rows will be filtered out.

        Summary: This question involves the row context, if you are interested, you can refer to:

        Row context in DAX - SQLBI

        Context in DAX Formulas - Microsoft Support

         

        Best Regards,

        Stephen Tao

         

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