Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi good day can anyone help me edit my calculated column, what i required on the new column is will show only the max number per week and the other will show null or 0. pls note i have multiple location
DESIRED OUTPUT
| Date | BP's | Location | Direct/InDirect | Week No: | Count Direct/inDirect/Location | CountMAX/Week/Location |
| 2/11/2026 | Mech | North | InDirect | 7 | 12 | null |
| 2/11/2026 | Mech | North | InDirect | 7 | 12 | null |
| 2/11/2026 | Mech | North | Direct | 7 | 12 | null |
| 2/11/2026 | Mech | North | Direct | 7 | 12 | null |
| 2/11/2026 | Mech | North | Direct | 7 | 12 | null |
| 2/11/2026 | Mech | North | Direct | 7 | 12 | null |
| 2/11/2026 | Mech | North | InDirect | 7 | 12 | null |
| 2/11/2026 | Mech | North | InDirect | 7 | 12 | null |
| 2/11/2026 | Mech | North | Direct | 7 | 12 | null |
| 2/11/2026 | Mech | North | Direct | 7 | 12 | null |
| 2/11/2026 | Mech | North | Direct | 7 | 12 | null |
| 2/11/2026 | Mech | North | Direct | 7 | 12 | null |
| 2/12/2026 | Mech | North | InDirect | 7 | 23 | 23 |
| 2/12/2026 | Mech | North | InDirect | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | InDirect | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | InDirect | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Civil | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/12/2026 | Elec | North | Direct | 7 | 23 | 23 |
| 2/13/2026 | Elec | North | InDirect | 7 | 13 | null |
| 2/13/2026 | Elec | North | InDirect | 7 | 13 | null |
| 2/13/2026 | Elec | North | InDirect | 7 | 13 | null |
| 2/13/2026 | Elec | North | InDirect | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
| 2/13/2026 | Elec | North | Direct | 7 | 13 | null |
Solved! Go to Solution.
Please try the measure below:
CountMAX =
VAR _maxCnt =
CALCULATE(
MAX('Table'[Count Direct/inDirect/Location]),
ALL('Table')
)
RETURN
IF(
'Table'[Count Direct/inDirect/Location] = _maxCnt,
'Table'[Count Direct/inDirect/Location],
BLANK() -- or 0
)
Hi @AllanBerces
Try this:
CountMAX/Week/Location Calc Column =
VAR _currentWeek = 'Table'[Week No:]
VAR _currentCode = 'Table'[Location]
VAR _DirecIndirect = 'Table'[Direct/InDirect]
VAR _FilteredTable =
FILTER (
'Table',
'Table'[Week No:] = _currentWeek && 'Table'[Location] = _currentCode
&& 'Table'[Direct/InDirect] = _DirecIndirect
)
RETURN
IF (
MAXX ( _FilteredTable, [Count Direct/inDirect/Location] ) = 'Table'[Count Direct/inDirect/Location],
'Table'[Count Direct/inDirect/Location]
)
Please try the measure below:
CountMAX =
VAR _maxCnt =
CALCULATE(
MAX('Table'[Count Direct/inDirect/Location]),
ALL('Table')
)
RETURN
IF(
'Table'[Count Direct/inDirect/Location] = _maxCnt,
'Table'[Count Direct/inDirect/Location],
BLANK() -- or 0
)
Hi @AllanBerces
Try this:
CountMAX/Week/Location Calc Column =
VAR _currentWeek = 'Table'[Week No:]
VAR _currentCode = 'Table'[Location]
VAR _DirecIndirect = 'Table'[Direct/InDirect]
VAR _FilteredTable =
FILTER (
'Table',
'Table'[Week No:] = _currentWeek && 'Table'[Location] = _currentCode
&& 'Table'[Direct/InDirect] = _DirecIndirect
)
RETURN
IF (
MAXX ( _FilteredTable, [Count Direct/inDirect/Location] ) = 'Table'[Count Direct/inDirect/Location],
'Table'[Count Direct/inDirect/Location]
)
Hi @danextian @cengizhanarslan Thank you very much for the reply it work as i need
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 45 | |
| 38 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 82 | |
| 69 | |
| 39 | |
| 29 | |
| 27 |