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
suneelkethagani
Frequent Visitor

Need DAX Code

Hi Guys,

I hope you all are doing well.

 

I have a question that is in my data I have Project IDs and Project Statuses along with Dates.

If the Project is changed from Status 1 to Status 2 then need to calculate that specific project is there in Status 1 in how many months. 

 

For example, "Project 1" starts with "Status 1" on August 10, 2022 and changed to "Status 2" on December 5, 2022. In that case, I need to present that Project "Project 1" under "Status 1" in August, September, October, November and December 2022. Like that I need to present all the Projects in all the statuses.

 

Each Status in separate "Line and Stacked Column Chart". 

On X-Axis, Month

On Y-Axis, Avg no. of Days spent

On Line, No. of Projects

 

Could you please help me?

 

Req1.PNGReq2.PNGReq3.PNG

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @suneelkethagani ,

 

From your example, Project ID: Project2022-01, Project2022-02... Do they represent the same Project or different ones? Also, some rows have only one status with a date, what should I do in this case?

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

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.

Hi  @v-jianboli-msft 

 

Project ID: Project2022-01, Project2022-02... are the different project ids. 01, 02, 03,... represents ids. 
Some projects starts with Status1, some projects starts with Status2,.... but not starts with Status5 and Status6.

https://drive.google.com/file/d/1m-2DX4knZdqESCCUT6KlNyht4TcQQDJf/view?usp=share_link 

Line and Stacked Column Chart:

If the "Project 1"starts with Intake on January 1, 2022 and changed to Feasibility on March 15, 2022. Then 

We need to show that project in January, February and March 2022 as count in line

and

In January 31 days, February 28 days and March 15 days need to show their averages in bars.

X-axis is Months

 

Thank you in advance

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.