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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.