Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Number of opened and closed issues per week + cumulative count of the opened issues in a chart

 Hello folks,

 

I would like to display on a "line and clustered chart" the number of tickets opened and closed per year week.
First I have my data table that looks like this :
 Capture.PNG

To do that, I followed the answer given in this topic LINK 

I created a calendar table and I linked it to the "creation date" :
Capture2.PNG

To finish, I created two columns in the table to put a 0 or 1 if closed or opened :

Opened = IF(ISBLANK('Data Struct'[Date closure]);1;0)
Closed = IF(ISBLANK('Data Struct'[Date closure]);0;1)
 
The problem is when I display that on a "line and clustered column chart" I don't get the real number of issues that where closed per week but the number of issues opened and closed the same week ( ex : last week I get 6 but I should get 50):
Capture3.PNG
 
The second question is how can we make a cumulative count of the opened issues ?
 
Thank you in advance !
 
1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,


this happens because you connect to [Created date]. You need to add a new relationship between your two tables, between Calendar[Date] and Data[Closed date]. This second relationship will be inactive. In order to make use of it, you have to use the USERELATIONSHIP-function inside a measure, something like this

measureClosed =
CALCULATE (
    SUM ( Data[Closed] );
    USERELATIONSHIP ( Data[Date Closure]; Calendar[Date] )
)

As for your cumulative count, it will depend a little on you Calendar-table, but in general it should look something like this

 

cumulative open =
CALCULATE (
    SUM ( data[open] );
    FILTER (
        ALL ( Calendar );
        Calendar[Week] <= MIN ( Calendar[Week] )
            && Calendar[Year] = MIN ( Calendar[Year] )
    )
)


Cheers,

Sturla

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors