Forum Discussion
Keeping null values in aggregation table
- Anonymous6 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
Anonymous , it not coming in one row because of CommitFlag, it has value Y and N. Take Max for that?
Typically Numbers has default aggregation as a sum. That should add up to one row. Or use some aggregation for Demand Hrs ,Commit Hrs
Amit,
Thanks for your reply, but does the MAX() function apply to Y\N values in a column? I thought the function only applies to numeric values only.
ixdutt