Forum Discussion

davidestg's avatar
davidestg
Helper I
7 years ago
Solved

Graphical representation of data with different axis

Hi all: 

 

 

I would like to represent in a graph the number of open incidents in a certain month, with respect to closed ones.

The difficulty lies in the fact that the axis of the data is different in each case and I do not see how to represent it in the same graph.

Example of data to be represented:

idCreated yearCreated MonthClosed YearClosed Month
1483742017920179
1497092017920179
1499482017920179
1500662017920179
1500022017920179
1499282017920179
14986920179201710
1500702017920179
1500922017920179
1500772017920179
1500042017920179
1500002017920179
1499662017920179
1499002017920179
14996020179201710
14990420179201710
1502342017920179
1502352017920179
1502362017920179
1502372017920179
1502382017920179
1502442017920179
1506182017920179
1512532017920179
1511872017920179
15110220179201711

 


Any ideas?

 

Thnks

  • Hi davidestg,

    Based on my test, you could refer to below steps:

    Sample data:

    Create a new table to list the distinct month:

    a = DISTINCT(UNION(VALUES(Table1[Closed Month]),VALUES(Table1[Created Month])))

    Create two relationships between the [Distinct Month] and the other two columns.

    Create two measures:

    Created Month count = CALCULATE(COUNT(Table1[id]),USERELATIONSHIP(Table1[Created Month],a[Distinct Month]))
    Closed Month count = CALCULATE(COUNT(Table1[id]),USERELATIONSHIP(Table1[Closed Month],a[Distinct Month]))

    Result:

     

    You could also download the pbix file to have a view.

     

    Regards,

    Daniel He

     

4 Replies

  • v-danhe-msft's avatar
    v-danhe-msft
    Microsoft Employee

    Hi davidestg,

    From your description, I could not figure out what is your desired result? Could you please post me your desired picture if possible/

     

    Regards,

    Daniel He

    • davidestg's avatar
      davidestg
      Helper I

      Hi v-danhe-msft

       

      I mean, as the graph showed, that is an overlap of two graphs, because de x axis is based in different series:

       

       

      I can represent a different data  in the same grapg if the main axis is equal, but in this case I have to represent the open issues Vs the closed issues every month, so i have to count how many issues I open in a month and how many issues I close, it means that every series have a different x axis. 

       

      Additionally, it have to change in the panel when I select a different year or month to show

       

      BR

      David

       

       

       

      • v-danhe-msft's avatar
        v-danhe-msft
        Microsoft Employee

        Hi davidestg,

        Based on my test, you could refer to below steps:

        Sample data:

        Create a new table to list the distinct month:

        a = DISTINCT(UNION(VALUES(Table1[Closed Month]),VALUES(Table1[Created Month])))

        Create two relationships between the [Distinct Month] and the other two columns.

        Create two measures:

        Created Month count = CALCULATE(COUNT(Table1[id]),USERELATIONSHIP(Table1[Created Month],a[Distinct Month]))
        Closed Month count = CALCULATE(COUNT(Table1[id]),USERELATIONSHIP(Table1[Closed Month],a[Distinct Month]))

        Result:

         

        You could also download the pbix file to have a view.

         

        Regards,

        Daniel He