Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Show opened vs closed tasks per week

Hi all, I'm working on some ticket reporting and want to plot a graph that shows tickets that have been opened or closed per week.   My raw data is this: Ticket ID Opened week Closed week ...
  • v-kelly-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    There're  2 ways:

    1.Go to "edit queries">select"open week" and "close week">"unpivot columns":

     

     

    Back to the report view, and put the columns in the clustered bar chart visual:

     

     

    2.Another way is to create a dimweek table using a dax expression as below:

     

    Dim week = DISTINCT(UNION(VALUES('Table'[Opened week]),VALUES('Table'[Closed week])))

     

     

    Then create 2 measures:

     

    Opened tickets = CALCULATE(COUNTA('Table'[Ticket ID]),USERELATIONSHIP('Dim week'[week],'Table'[Opened week]))
    Closed tickets = CALCULATE(COUNTA('Table'[Ticket ID]),USERELATIONSHIP('Dim week'[week],'Table'[Closed week]))

     

    Finally,put the dimweek and measures  in the clustered bar chart visual:

     

    For the related .pbix file,pls click here.

     

    Best Regards,
    Kelly

     

    Did I answer your question? Mark my post as a solution!