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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
sohananahid
Post Partisan
Post Partisan

Calculate % of Features Done for each Epic

 Hi,

I have a table "EPIC" it has different columns: ID, Work Item Type [Theme, Epic, Feature], State [New, In Progress, Done], Parent ID, etc.

I have a Gantt chart, which has Task= Title of Epic and Parent= Theme Title. The Gantt chart shows the Start and Target dates of different Epics for a specific Theme.

I am trying to show the progress [%of completion of features for each Epic] as the user hovers over the Gantt Chart and may click an Epic bar

-I created 2 measures as follows:

1. Count of Features Done =

    VAR Y= COUNTROWS(FILTER('EPIC','EPIC'[Work Item Type]="Feature" && 'EPIC'[State]="Done"))

 RETURN

   IF(ISBLANK(Y), 0,Y)

 

2. % Done Features = DIVIDE([Count of Features Done],[Count of Features])+0

 

-I added a Calculated Column, 'Col % Features Done' to the "EPIC" table using the measure, '% Done Features'. I have added this Column/Field to the Tooltip of the Gantt Chart

 

-In "EPIC" table, there are 2 features for an Epic that have State= "Done",

-My issues:

1. '% Done Features' measure and hence'Col % Features Done' are showing 100% for the Feature, 0% for the Epic [where the Features belong]

2. for the above issue, Col % Features Done' in Tooltip doesn't show 100% [rather shows the 0%] for that Epic

 

sohananahid_1-1685733653875.png

 

 I have been trying to find the DAX query with Group by or for each [so that I can calculate the count of "Done" features" for each Epic], but couldn't find any yet.

I would appreciate it if anyone has any suggestions. Many thanks.

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @sohananahid ,

 

Please try:

Count of Features = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),[Parent]=SELECTEDVALUE('Table'[ID])&&[Work Item Type]="Feature"))+0

Count of Features Done = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),[Parent]=SELECTEDVALUE('Table'[ID])&&[Work Item Type]="Feature"&&[State]="Done"))+0

% Done Features = DIVIDE([Count of Features Done],[Count of Features])+0

Final output:

vjianbolimsft_0-1686118655632.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @sohananahid ,

 

Please try:

Count of Features = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),[Parent]=SELECTEDVALUE('Table'[ID])&&[Work Item Type]="Feature"))+0

Count of Features Done = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),[Parent]=SELECTEDVALUE('Table'[ID])&&[Work Item Type]="Feature"&&[State]="Done"))+0

% Done Features = DIVIDE([Count of Features Done],[Count of Features])+0

Final output:

vjianbolimsft_0-1686118655632.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It works! Thanks so much @v-jianboli-msft! 🙂

sohananahid
Post Partisan
Post Partisan

Hi all,

I am still trying to get a solution for the issue I described earlier- would appreciate it if anyone can help. 

I did little clean up the data- 

sohananahid_0-1686068882217.png

-In "EPIC" table, there is 1 feature [ID=757390] for an Epic [ID= 658161]that have State= "Done", 

-My issues:

1. '% Done Features' measure and hence 'Col % Features Done' are showing 100% for the Feature, 0% for the Epic [where the Feature belong]. I want 100% to show up for the Epic.

2. for the above issue, Col % Features Done' in Tooltip shows 100% for the Feature and  0% for that Epic

sohananahid_1-1686073874398.png

 

Thanks.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.