This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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 the data set and I'm trying to consolidation all of them to 1 row. I created a Y\N flag to identify if the value in the committed column is either 0 or null. the data set looks like this:
| WorkCategoryValue | Project NameID | ResourceRoleValue | ResourceNameId | TaskDetail | Tier34OrgId | MonthCat | Hours | Date | Demand Hrs | Commit Hrs | BlankCommitFlag |
| Project | 35 | Electrical Engineer 2 | TTS Analyst | 11 | AugGap | 48 | 8/1/2020 | 0 | 0 | N | |
| Project | 35 | Electrical Engineer 2 | TTS Analyst | 11 | Aug | 48 | 8/1/2020 | 48 | 0 | N | |
| Project | 35 | Electrical Engineer 2 | TTS Analyst | 11 | AugCommit | 8/1/2020 | 0 | Y | |||
|
I aggregated the data set, but I'm generating two rows where there should be only one, it appears as follows:
| WorkCategoryValue | ProjectNameId | ResourceRoleValue | ResourceNameId | TaskDetail | Date | BlankCommitFlag | Demand Hrs | Commit Hrs |
| Project | 35 | Electrical Engineer 2 | TTS Analyst | 8/1/2020 | N | 48 | 0 | |
| Project | 35 | Electrical Engineer 2 | TTS Analyst | 8/1/2020 | Y | 0 |
I'm trying to find a way to replace the 0 values with null so I can consolidate the aggregated table into 1 row. I'm not sure how to do this and could use some help,
ixdutt
Solved! Go to Solution.
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
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
Hi @Anonymous,
how you aggregated the data?
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
mwegener,
I first added the following column to the source data set to identify null values in the data set (I realize that null values are replaced by 0 values in aggregation tables):
BlankCommitFlag = IF(ISBLANK([Commit Hours]), "Y", "N"
Then in the Data View, Modelling > Create Table
'AGG_REsource Request = SUMMARIZE('FACT_ResourceRequestList',[WorkCategoryValue],[ProjectNameId],[Tier34OrgId],' etc. to build out the aggregated table.
I hope that helps,
ixdutt
Hi @Anonymous
do not include the column BlankCommitFlag in your SUMMARIZE
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
@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
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 22 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 45 | |
| 23 | |
| 18 | |
| 18 |