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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors