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

Power BI Chart for Project Status

Hi All I need a critical help. I tried alot to create a chart for Project status count based no of activities .I have a dummy data and output expected as below

Project IDTask NameActivity StatusPerson AssignedPlanned StartPlanned Finish%Complete
1DesignCompleteMike1-Sep2-Sep100%
1TestCompleteMike2-Sep3-Sep100%
1DevlopCompleteBrent3-Sep4-Sep100%
2CallCompleteBrent5-Sep6-Sep100%
2DriveIn ProgressMike7-Sep19-Sep30%
3WorkingIn ProgressMike7-Sep19-Sep10%
3TestingNot StartedBrent19-Sep20-Sep0%
4SwitchDeferedBrent3-Sep3-Sep0%
5FileNot StartedBrent21-Sep23-Sep0%
5TryCompleteBrent3-Sep3-Sep100%

 

Output as

 

Project IDProject Status
1Complete
2In Progress
3In Progress
4Deferred
5In Progress

sur2307_0-1663083522865.png

 

7 REPLIES 7
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Column:

Project Status = 
Var _MaxComplete=CALCULATE(MAX('Table'[%Complete]),ALLEXCEPT('Table','Table'[Project ID]))
Var _MinComplete=CALCULATE(MIN('Table'[%Complete]),ALLEXCEPT('Table','Table'[Project ID]))
VAR _ResultComplete=IF(_MaxComplete=1,_MinComplete,IF(_MinComplete=0,_MaxComplete))
return
CALCULATE (
    MAX ( 'Table'[Activity Status] ),
    FILTER (
        ALL ( 'Table' ),
        [%Complete] = _ResultComplete
            && [Project ID] = EARLIER( 'Table'[Project ID] )
    )
)

Result:

vzhangti_0-1663145842412.png

vzhangti_1-1663145866301.png

vzhangti_3-1663145911819.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

Anonymous
Not applicable

Thanks alot for trying to help. But I have added two more tasks for Project ID5 as below, Where there are  2 Not Started and 1 complete, so still Project 5 to be considered in  Progress state. But in the table its reflecting as Not Started.

sur2307_0-1663152175279.png

 

Anonymous
Not applicable

@DataInsights @amitchandak  Please help..am struggling with this requirement. A solution can solve 80% of my worries.

Greg_Deckler
Super User
Super User

@Anonymous Seems like:

Project Status Measure = 
  VAR __LastDate = MAX('Table'[AssignedPlanned])
  VAR __Status = MAXX(FILTER('Table',[Assigned Planned] = __LastDate),[Activity Status])
RETURN
  __Status

This will get you your table. For the graphic, you will have to use a disconnected table of your status values. In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick/ba-p/279563


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

This is based on Planned Start or Planned Finish? Can we set around the logic with %Complete.

Anonymous
Not applicable

Does this help to create the chart?

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.