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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-xiandat-msft
Community Support
Community Support

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.

 

@v-xiandat-msft 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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