Forum Discussion

Erikestrela's avatar
Erikestrela
Frequent Visitor
6 years ago
Solved

Clustered column chart - Combined Chart

Hi Masters,

 

How to create a clustered column chart comparing the amount of Incident Open x amount of Incident Closed by month?

 

The expected result should be like this:

 

 

 

 

Table sample:

 

Incident NumberDate Recorded Date Closed
204/01/2004/15/20
304/02/2004/16/20
404/03/2004/17/20
504/04/2004/18/20
604/05/2004/19/20
704/06/2004/20/20
804/07/2004/21/20
904/08/2004/22/20
1001/03/2002/11/20
1101/04/2002/12/20
1201/05/2002/13/20
1301/06/2002/14/20
1401/07/2002/15/20
1501/08/2002/16/20
1602/10/2003/20/20
1702/11/2003/21/20
1802/12/2003/22/20
1902/13/2003/23/20
2002/14/2003/24/20
2102/15/2003/25/20
2202/16/2003/26/20
2302/17/2003/27/20
2402/18/2003/28/20
2503/18/2004/01/20
2603/19/2004/02/20
2703/20/2004/03/20
2803/21/2004/04/20
2903/22/2004/05/20
3003/23/2004/06/20
3103/24/2004/07/20

 

Thanks in advance!

4 Replies

    • Erikestrela's avatar
      Erikestrela
      Frequent Visitor

      Thanks amitchandak! With this example I could develop my chart. 

      Another solution was duplicate the table leaving just Closed column in there and link it with the Calendar table. Not very clever but works 🙂

       

      Thank you.

  • v-yingjl's avatar
    v-yingjl
    Community Support

    Hi Erikestrela ,

    If I understood how total open and total closed calculated correctly, you can create a Date table first and then create the following measures:

    Total open =
    VAR _date =
        SELECTEDVALUE ( 'Date'[Date] )
    RETURN
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Incident Number] ),
            FILTER (
                ALLSELECTED ( 'Table' ),
                _date >= 'Table'[Date Recorded]
                    && _date <= 'Table'[Date Closed]
            )
        )
    Total Closed =
    VAR _date =
        SELECTEDVALUE ( 'Date'[Date] )
    RETURN
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Incident Number] ),
            FILTER (
                ALLSELECTED ( 'Table' ),
                _date < 'Table'[Date Recorded]
                    || _date > 'Table'[Date Closed]
            )
        )

    Here is the demo based on my understanding, please try it:

    PBIX 

    If my understanding has something wrong, please let me know and you can share more details like how they calculate for further discussion.

     

    Best Regards,
    Yingjie Li

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

    • Erikestrela's avatar
      Erikestrela
      Frequent Visitor

      Thank you v-yingil! 

      With your example I could have more insights of how to deal with it.