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
Malorian
Regular Visitor

Custom Column Showing When All Complete

My data set has packages that have components (there can be any number of components) where each component is a separate row.

 

I'm looking to make a custom column that identifies when all of the components for a given package is complete. The data for if it's complete or not is true/false.

 

What would the dax be for this?

Malorian_0-1709126953076.png

 

1 ACCEPTED SOLUTION
Malorian
Regular Visitor

In the end, this is what worked:

 

Ready for Comp =
var result =CALCULATE(MIN('Table'[Component Complete]),ALLEXCEPT('Table','Table'[Package]))
return
IF(result="False","Not Ready","Ready")

View solution in original post

5 REPLIES 5
Malorian
Regular Visitor

In the end, this is what worked:

 

Ready for Comp =
var result =CALCULATE(MIN('Table'[Component Complete]),ALLEXCEPT('Table','Table'[Package]))
return
IF(result="False","Not Ready","Ready")
v-yilong-msft
Community Support
Community Support

Hi @Malorian ,

Based on your problems, here are my answers.

I create a corresponding table based on your needs.

vyilongmsft_0-1709085211959.png

Then write the DAX code to get a new column, this column is used to indicate whether the item is complete or not, denoted by True/False.

Column =
VAR _aa = 'Table'[PackageID]
VAR _A =
    CALCULATETABLE ( 'Table', FILTER ( 'Table', 'Table'[PackageID] = _aa ) )
VAR _B =
    FILTER ( _A, 'Table'[IsComplete] = FALSE () )
RETURN
    IF ( COUNTROWS ( _B ) = 0, TRUE (), FALSE () )

Finally, you will get what you want.

vyilongmsft_1-1709085679824.png

 

 

 

Best Regards

Yilong Zhou

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

To be clear, this is more of the table I'm dealing with:

Malorian_1-1709126924627.png

 

Hi,

Go to the "Modeling" tab in Power BI.

  1. Click on "New Column" from the toolbar.

  2. In the formula bar that appears, enter the following DAX formula:

AllComponentsComplete =
CALCULATE(
AND(
COUNTROWS(FILTER('YourTable', 'YourTable'[PackageID] = EARLIER('YourTable'[PackageID]))),
COUNTROWS(FILTER('YourTable', 'YourTable'[PackageID] = EARLIER('YourTable'[PackageID]) && 'YourTable'[Complete] = TRUE))
),
ALLEXCEPT('YourTable', 'YourTable'[PackageID])
)

I'm getting an error:

Malorian_0-1709126753995.png

 

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.