March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
i am new to power bi, and i am struggling with something i believed would be basic.
i have a datatable with this structure (simplified):
P1 | E1 | US1 | 1 |
P1 | E1 | US2 | 0 |
P1 | E1 | US3 | 0 |
P1 | E2 | US4 | 1 |
P1 | E2 | US5 | 1 |
P2 | E3 | US6 | 1 |
P2 | E3 | US7 | 1 |
"US done" tells me if the user story is done (1) or not (!= 1). An epic is done if all associated user stories are done.
I am trying to get a visual of the number of Epic done per project, for example a table (based on the previous example):
P1 | 1 | 2 |
P2 | 1 | 1 |
I calculated the total number of US: total_us = COUNT(US)
and the number of US that are done total_done_us = CALCULATE( COUNT(US) , US Done = 1 )
And then i calculate the difference between total_done_us and total_us: Epic done = if(total_us - total_done_us =0, 1,0)
but it does not takes the epics into account, only the total of user stories.
I tried using a table or a matrix visual, but i do not success in having only the project name and the total of epic done per project and the total of epic per project.
Solved! Go to Solution.
Total US = DISTINCTCOUNT(SampleData[US])
Total US - Done = CALCULATE([Total US],SampleData[US done] = 1)
Total Epic = DISTINCTCOUNT(SampleData[Epic])
Total Epic - Done = COUNTAX(FILTER(GROUPBY(SampleData,SampleData[Epic]),[Total US] = [Total US - Done]),1)
Proud to be a Super User!
Thanks Bolfri !
it works, i still have some work to understand some of the magical line:
Total Epic - Done = COUNTAX(FILTER(GROUPBY(SampleData,SampleData[Epic]),[Total US] = [Total US - Done]),1)
GROUPBY(SampleData,SampleData[Epic]) is same as DISTINCT(SampleData[Epic])
For each unique Epic check if Total US = Total US - Done. If yes, mark it as 1. 🙂 COUNTAX SUMs Epic by this 1.
Proud to be a Super User!
Total US = DISTINCTCOUNT(SampleData[US])
Total US - Done = CALCULATE([Total US],SampleData[US done] = 1)
Total Epic = DISTINCTCOUNT(SampleData[Epic])
Total Epic - Done = COUNTAX(FILTER(GROUPBY(SampleData,SampleData[Epic]),[Total US] = [Total US - Done]),1)
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |