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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
chitti5
Helper I
Helper I

Add Project Types with different values in same Formula

Hi,  I have two types of projects 1. Agile 2. Software. The below formulas applies to both the Project types. Initially our projects took 3 months to complete but lately it was taking 6 months so I wanted to show the 3 months data in 6 months and took an expert's help from the community. But the issue now I'm facing is I want to show the data from 3 months to 6 months for Agile projects only not for Software projects since they take 3 months to complete, so old formula (3 months formula) works fine for Software projects. Could anyone please suggest if there is any DAX formula or IF condition that we can apply to show 6 months formula for Agile and 3 months formula for Software. For Agile projects we take 60 Hours and for Software projects we take 6 hrs to complete

 

Thanks in advance!
2 REPLIES 2
Anonymous
Not applicable

Hi @chitti5 ,

Below is my table:

vxiandatmsft_0-1715578653878.png

Since you have previously completed writing three months of data and six months of data and got it successfully, the question is how to display the three months of data for Agile.

The following sample DAX might work for you:

Measure = IF(
     SELECTEDVALUE('Table'[Projects]) = "Agile" , 
     "Agile data", // Placing Your Agile Data Measure
     "Software data"// Placing Your Software Data Measure
     )

The final output is shown in the following figure:

vxiandatmsft_1-1715578782877.png

Or you can filter specific fields with filters.

vxiandatmsft_2-1715578829850.png

Best Regards,

Xianda Tang

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

 

@Anonymous Hi Thank you for the reply. I want to show three months of data for Software projects not Agile. I have two formulas - 3 months formula with which I can get my Software projects values and 6 months formula with which I can get Agile projects values correctly. I was requesting if there is a condition I can combine both the formulas differentiating by project types to show both Agile and Software in same chart.  FYI - I have 150+ projects differentiated by project types.

 

Do I need to modify the formula you showed in the way below to get the desired output?

 

Measure = IF(
     SELECTEDVALUE('Table'[Projects]) = "Agile" , 
     "Agile data", // Placing 6 month formula for Agile Data
    IF(SELECTEDVALUE('Table'[Projects]) = "Software", "Software data"// Placing my 3 months formula for Software Data
     )

 Please suggest! Thank you so much! 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.