Forum Discussion

ageuffrard's avatar
ageuffrard
Frequent Visitor
4 years ago
Solved

Graph don't display the same data than the table

Hi everyone, 

This is my dashboard in Power BI : 

 

I got clients related to "polices" in Excel, like this :

Client_A -> Police_1
Client_B -> Police_1
Client_B -> Police_2
Client_C -> Police_1
Client_C -> Police_2
Client_C -> Police_3
...
Client_X -> Police_X

It gaves me the table you see on the right.

The graph of the left shows how many clients are related to the police concerned, so you can see the Police_1 got 10 clients related, Police_2 got 6, etc...

I want to create a graph where it shows the same data of the table (Police_1 = 4, Police_2 = 3, Police_3 = 2, Police_4 = 1)

With that I'll be able to see how many clients are related to a specific amount of police.

 

Thanks for your help, 

Alexandre

 

 

 

  • Hi,

    Create a table called NumberOfPolicies (Or whatever)

    then
    1. Create a Column chart
    2. Put NumberOfPolicies[Value] on X-Axis
    3. Put CountCustomersWithXPolicies measure on Y-axis

     

5 Replies

  • ageuffrard , Not very clear Why police 1 = 10 wrong and 4 is correct

     

    do you need a distinct count

     

    distinctcount(Table[client])

    • ageuffrard's avatar
      ageuffrard
      Frequent Visitor

      Hi amitchandak , in my table on the right, there is 4 values equals to "1", 3 equals to "2", 2 equals to "3" and 1 equals to "4".
      I want to do a graph (column chart) where the x-axis corresponds to the "Number of Police" like this :

      Problem is I can only get my column "number of police" thanks to this option :

      I’m not comfortable with Dax so i struggle a bit.

       

       

  • Hi ageuffrard ,

    According to your description, I create a sample.

    In the column chart , just put the police in the Axis and the Client Name in the Values, select Count of Client Name. Get the correct result.

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

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

  • Hi,

    Create a table called NumberOfPolicies (Or whatever)

    then
    1. Create a Column chart
    2. Put NumberOfPolicies[Value] on X-Axis
    3. Put CountCustomersWithXPolicies measure on Y-axis

     

  • Hi ageuffrard ,

    Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

    Best Regards,
    Community Support Team _ kalyj