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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
JeevanMallya
Resolver II
Resolver II

Generate TOTAL_INSPRINTBUGS_SPRINTWISE and show Issue Key that can be used for Drill through later

I have the following table

PROJECT_KEYSPRINT_NAMEISSUE_KEYYEAR
ABCABC Sprint 01ABC-3902022
ABCABC Sprint 01ABC-3922022
ABCABC Sprint 02ABC-4362022
ABCABC Sprint 02ABC-4372022
ABCABC Sprint 02ABC-4382022
ABCABC Sprint 03ABC-4632022
ABCABC Sprint 03ABC-4772022
ABCABC Sprint 07ABC-8572022
ABCABC Sprint 07ABC-8582022
ABCABC Sprint 08ABC-9312023
ABCABC Sprint 08ABC-9322023
ABCABC Sprint 08ABC-9342023
ABCABC Sprint 08ABC-9352023
ABCABC Sprint 08ABC-9372023
ABCABC Sprint 08ABC-9132023
ABCABC Sprint 08ABC-9152023
ABCABC Sprint 08ABC-8952023

 

I want to get the TOTAL_INSPRINTBUGS_SPRINTWISE and include ISSUE_KEYS in single row seperated by comma speint wise.

Just like the below table

PROJECT_KEYSPRINT_NAMEISSUE_KEYYEARTOTAL_INSPRINTBUGS_SPRINTWISE
ABCABC Sprint 01ABC-390,ABC-39220222
ABCABC Sprint 02ABC-436,ABC-437,ABC-43820223
ABCABC Sprint 03ABC-463,ABC-47720222
ABCABC Sprint 07ABC-857,ABC-85820222
ABCABC Sprint 08ABC-931,ABC-932,ABC-934,ABC-935,ABC-937,ABC-913,ABC-915,ABC-89520238

 

I am trying to do this since later i can generate Rolling average of Insprint bugs sprint wise and also Drill through to show the ISSUE_KEYS that were reported in particular sprint.

Please help how this can be done.

4 ACCEPTED SOLUTIONS
amustafa
Super User
Super User

This can be done in Power Query much easier. Here's the M Code.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jc47CoAwEATQq4TUCsluvqV6BMuQA9iIiPdHJRG7ZJplBh7MpiSneZHDe8V6nNt+CaVLHzmqJ5EiknloQ2pDqtCwQ6FHYWhD/qBjEPrOtK8wWBh2fgwVRtYFchcSCg0KLQo9CDWjEJwO8Yf5Bg==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [PROJECT_KEY = _t, SPRINT_NAME = _t, ISSUE_KEY = _t, YEAR = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"PROJECT_KEY", type text}, {"SPRINT_NAME", type text}, {"ISSUE_KEY", type text}, {"YEAR", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"PROJECT_KEY", "SPRINT_NAME", "YEAR"}, {
        {"ISSUE_KEY", each Text.Combine([ISSUE_KEY], ","), type text},
        {"TOTAL_INSPRINTBUGS_SPRINTWISE", each Table.RowCount(_), Int64.Type}
    })
in
    #"Grouped Rows"

 

 

Results:

 

amustafa_0-1733990887246.png

 





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

Proud to be a Super User!




View solution in original post

JeevanMallya
Resolver II
Resolver II

Thank you very much

View solution in original post

JeevanMallya
Resolver II
Resolver II

Thank you very much

View solution in original post

Hi @JeevanMallya, please consider to accept the correct reply as solution.

 

 

 

View solution in original post

6 REPLIES 6
Kedar_Pande
Super User
Super User

@JeevanMallya 

Create a Calculated Table

SummarizedTable =
SUMMARIZE(
'Table',
'Table'[PROJECT_KEY],
'Table'[SPRINT_NAME],
'Table'[YEAR],
"ISSUE_KEYS", CONCATENATEX('Table', 'Table'[ISSUE_KEY], ","),
"TOTAL_INSPRINTBUGS_SPRINTWISE", COUNT('Table'[ISSUE_KEY])
)

Create measure:

Rolling_Average =
CALCULATE(
AVERAGE(SummarizedTable[TOTAL_INSPRINTBUGS_SPRINTWISE]),
DATESINPERIOD(SummarizedTable[SPRINT_NAME], MAX(SummarizedTable[SPRINT_NAME]), -3, MONTH)
)

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

JeevanMallya
Resolver II
Resolver II

Thank you very much

Hi @JeevanMallya, please consider to accept the correct reply as solution.

 

 

 

JeevanMallya
Resolver II
Resolver II

Thank you very much

Bibiano_Geraldo
Super User
Super User

Hi @JeevanMallya ,

You can achieve the desired result by following this steps:

 

1- Use the following DAX measure to create a concatenated string of ISSUE_KEY sprint-wise:

ISSUE_KEYS_SPRINTWISE = 
CONCATENATEX(
    FILTER(
        'YourTable',
        'YourTable'[SPRINT_NAME] = MAX('YourTable'[SPRINT_NAME]) &&
        'YourTable'[PROJECT_KEY] = MAX('YourTable'[PROJECT_KEY])
    ),
    'YourTable'[ISSUE_KEY],
    ","
)

 

2- Create a measure to count the total issues in each sprint:

TOTAL_INSPRINTBUGS_SPRINTWISE = 
COUNTROWS(
    FILTER(
        'YourTable',
        'YourTable'[SPRINT_NAME] = MAX('YourTable'[SPRINT_NAME]) &&
        'YourTable'[PROJECT_KEY] = MAX('YourTable'[PROJECT_KEY])
    )
)

 

3- Now you can create a table visualization with the following columns: PROJECT_KEYSPRINT_NAMEISSUE_KEYS_SPRINTWISEYEARTOTAL_INSPRINTBUGS_SPRINTWISE.

 

Your final output should look like this:
Bibiano_Geraldo_0-1733992034610.png

 

 

amustafa
Super User
Super User

This can be done in Power Query much easier. Here's the M Code.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jc47CoAwEATQq4TUCsluvqV6BMuQA9iIiPdHJRG7ZJplBh7MpiSneZHDe8V6nNt+CaVLHzmqJ5EiknloQ2pDqtCwQ6FHYWhD/qBjEPrOtK8wWBh2fgwVRtYFchcSCg0KLQo9CDWjEJwO8Yf5Bg==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [PROJECT_KEY = _t, SPRINT_NAME = _t, ISSUE_KEY = _t, YEAR = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"PROJECT_KEY", type text}, {"SPRINT_NAME", type text}, {"ISSUE_KEY", type text}, {"YEAR", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"PROJECT_KEY", "SPRINT_NAME", "YEAR"}, {
        {"ISSUE_KEY", each Text.Combine([ISSUE_KEY], ","), type text},
        {"TOTAL_INSPRINTBUGS_SPRINTWISE", each Table.RowCount(_), Int64.Type}
    })
in
    #"Grouped Rows"

 

 

Results:

 

amustafa_0-1733990887246.png

 





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

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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