Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Keeping null values in aggregation table

I"m working on a report to identify if resources have been committed correctly to various projects. The demand hours, commit hours, and constrained hours (gap hours) are on three different rows in th...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous 

    I build the same table as yours to have a test.

    Just like mwegener replied before you when you summarize ,you don’t need to add the BlankCommitFlag.

    I build Measure to achieve your goal.

    'AGG_REsource Request =
    
    VAR _MAXDH =
    
        MAXX (
    
            FILTER (
    
                ALL ( 'Table' ),
    
                'Table'[Project NameID] = MAX ( 'Table'[Project NameID] )
    
            ),
    
            'Table'[Demand Hrs]
    
        )
    
    VAR _MAXGH =
    
        MAXX (
    
            FILTER (
    
                ALL ( 'Table' ),
    
                'Table'[Project NameID] = MAX ( 'Table'[Project NameID] )
    
            ),
    
            'Table'[Gap Hours]
    
        )
    
    VAR _MAXCS =
    
        MAXX (
    
            FILTER (
    
                ALL ( 'Table' ),
    
                'Table'[Project NameID] = MAX ( 'Table'[Project NameID] )
    
            ),
    
            'Table'[Commit Hrs]
    
        )
    
    RETURN
    
        SUMMARIZE (
    
            'Table',
    
            [WorkCategoryValue],
    
            [Project NameID],
    
            'Table'[ResourceRoleValue],
    
            'Table'[ResourceNameId],
    
            'Table'[TaskDetail],
    
            'Table'[Date],
    
            "Demand Hrs", _MAXDH,
    
            "Gap Hours", _MAXGH,
    
            "Commit Hrs", _MAXCS
    
        )

    Result:

    You can download the pbix file from this link: Keeping null values in aggregation table

     

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

     

    Best Regards,

    Rico Zhou