Forum Discussion

SDVN's avatar
SDVN
Icon for Helper I rankHelper I
1 year ago

Help to show the completion status

I have the data in the below format and I want to show the How many projects are there in each stage. If the stage one is "Completed" then the project in in stage 2, if shage 2 is completed, it means the project is in staghe 3. I tried but I couldn't think of a way to calculate the number of projects in stage 1, number of projects in stage 2 and so on. And also as my management team wants to see the number of projects in each stage, what graph can i use to show this

 

 

10 Replies

  • Hi SDVN  - Create a new calculated column in Power BI that determines the current stage of each project.

    Project Stage =
    VAR Stages = {"Stage 1", "Stage 2", "Stage 3", "Stage 4", "Stage 5"}
    VAR CompletedStages =
    FILTER(
    Stages,
    SWITCH(
    TRUE(),
    SELECTEDVALUE('Projects'[Stage 5]) = "Completed", 5,
    SELECTEDVALUE('Projects'[Stage 4]) = "Completed", 4,
    SELECTEDVALUE('Projects'[Stage 3]) = "Completed", 3,
    SELECTEDVALUE('Projects'[Stage 2]) = "Completed", 2,
    SELECTEDVALUE('Projects'[Stage 1]) = "Completed", 1,
    0
    ) = VALUE(RIGHT([Value],1))
    )
    RETURN
    MAXX(CompletedStages, VALUE(RIGHT([Value],1)) + 1)

     

     

    you can also count the number of projects by using measure below:

    Projects per Stage =
    COUNTROWS(
    FILTER('Projects', 'Projects'[Project Stage] = SELECTEDVALUE('Stages'[Stage Number]))
    )

     

     

    Hope this helps.

     

     

  • Hi SDVN 

    Follow the below steps :

    1. Create calculated col using the below DAX.

     

    Project_Stage =
    SWITCH(TRUE(),
        'Project status'[state 2] = "", "Stage 1",
        'Project status'[stage 3] = "", "Stage 2",
        'Project status'[stage 4] = "", "Stage 3",
        "Stage 4"
    )

     

    2. Create a measure to count using the below DAX.

    3. Use col chart ---(on x-axis put project_stage ( calculated col)   and on y axis put cnt_project) 
    and here is the result



    If this answers your questions. kindly mark it as a solution.

  • v-karpurapud's avatar
    v-karpurapud
    Icon for Community Support rankCommunity Support

    Hello SDVN 

    Could you please confirm if your query have been resolved the solution provided by mdaatifraza5556 ,rajendraongole1 and DineshYadl ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.If not please share the details , so that we can assist you better.

    Thank you!


    • SDVN's avatar
      SDVN
      Icon for Helper I rankHelper I

      v-karpurapud Its not working for me. Is there a way I can share the file? Am not able to attach here.

      • SDVN's avatar
        SDVN
        Icon for Helper I rankHelper I

        I unpivoted and added an order column, would this help? Can we use this atleast? 

         

         

  • v-karpurapud's avatar
    v-karpurapud
    Icon for Community Support rankCommunity Support

    Hi SDVN 

    We have not received a response from you regarding the query and were following up to check if you have found a resolution. If you have identified a solution, we kindly request you to share it with the community, as it may be helpful to others facing a similar issue.

    If you find the response helpful, please mark it as the accepted solution and provide kudos, as this will help other members with similar queries.

    Thank You!

    • v-karpurapud's avatar
      v-karpurapud
      Icon for Community Support rankCommunity Support

      Hi SDVN 

      We are following up once again regarding your query. If the issue has been resolved, we kindly request you to share the resolution or key insights here to help others in the community. If we don’t hear back, we’ll go ahead and close this thread.

      Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.

       

      Thank you for your understanding and participation.