Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AllanBerces
Post Prodigy
Post Prodigy

Blank if Count is same on the other days within the week

Hi Good day can anyone help me edit my caculated column. What i required is if the count on column Count/DirectInDirect/Location is same on the other day with the week then the WKLY POB PLAN will show blank on the other day.

 

WKLY POB PLAN =
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/DirectInDirect/Location] ) = 'Table'[Count/DirectInDirect/Location],
        'Table'[Count/DirectInDirect/Location]
    )
AllanBerces_0-1771373076465.png

DESIRED OUTPUT

AllanBerces_1-1771373149505.png
DateTradeLocationDirect/InDirectWeek No:Count/DirectInDirect/LocationWKLY POB PLAN
2/15/2026MechNorthInDirect71212
2/15/2026MechNorthDirect71212
2/15/2026MechNorthDirect71212
2/15/2026MechNorthDirect71212
2/15/2026MechNorthDirect71212
2/15/2026CivilNorthInDirect71212
2/15/2026CivilNorthDirect71212
2/15/2026CivilNorthDirect71212
2/15/2026CivilNorthDirect71212
2/15/2026CivilNorthDirect71212
2/15/2026MechNorthDirect71212
2/15/2026MechNorthDirect71212
2/11/2026CivilSouthInDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/11/2026CivilSouthDirect71515
2/12/2026CivilSouthInDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
2/12/2026CivilSouthDirect715 
3 ACCEPTED SOLUTIONS

Hi @AllanBerces,

I created this code that seems to work

 

WKLY POB PLAN 2 =
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/DirectInDirect/Location] ) = 'Table'[Count/DirectInDirect/Location] && MINX ( _FilteredTable, 'Table'[Date] ) = 'Table'[Date],
        'Table'[Count/DirectInDirect/Location]
    )
 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

View solution in original post

Praful_Potphode
Super User
Super User

Hi @AllanBerces 

try attached PBIX.

if this doesnt work please help with sample explanation for few rows.

 

Please give kudos or mark it as solution once confirmed.

 

Thanks and Regards,

Praful

View solution in original post

hello @AllanBerces 

 

what is your DAX in there?

 

seems different from my result.. there should be a value on 2/11/2026 while your screenshot show blank.

 

also for the bottom highlight, please adjust the DAX into this (the red one). I dont realize there will be a different 'Table'[Count/DirectInDirect/Location] value in same date.

WKLY POB PLAN =
var _Yearweek = YEAR('Table'[Date])&FORMAT(WEEKNUM('Table'[Date]),"00")
var _Mindate =
MINX(
    FILTER(
        'Table',
        YEAR('Table'[Date])&FORMAT(WEEKNUM('Table'[Date]),"00")=_Yearweek
    ),
    'Table'[Date]
)
var _IF =
IF(
    _Mindate='Table'[Date],
    _Mindate
)
Return
IF(
    'Table'[Date]=_Mindate,
    'Table'[Count/DirectInDirect/Location]
)

 

Thank you.

View solution in original post

9 REPLIES 9
v-ssriganesh
Community Support
Community Support

Hi @AllanBerces,

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @Irwan@Praful_Potphode & @FBergamaschi for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

 

Thank you for being part of the Microsoft Fabric Community.

Praful_Potphode
Super User
Super User

Hi @AllanBerces 

try attached PBIX.

if this doesnt work please help with sample explanation for few rows.

 

Please give kudos or mark it as solution once confirmed.

 

Thanks and Regards,

Praful

Irwan
Super User
Super User

hello @AllanBerces 

 

please check if this accomodate your need.

Irwan_0-1771379425764.png

create a new calculated column with following DAX.

WKLY POB PLAN =
var _Yearweek = YEAR('Table'[Date])&FORMAT(WEEKNUM('Table'[Date]),"00")
var _Mindate =
MINX(
    FILTER(
        'Table',
        YEAR('Table'[Date])&FORMAT(WEEKNUM('Table'[Date]),"00")=_Yearweek
    ),
    'Table'[Date]
)
var _IF =
IF(
    _Mindate='Table'[Date],
    _Mindate
)
Return
MINX(
    FILTER(
        'Table',
        'Table'[Date]=_IF
    ),
    'Table'[Count/DirectInDirect/Location]
)
Hope this will help.
Thank you.

Hi @Irwan thank you for the reply but its not giving the required i need.

hello @AllanBerces 

 

can you share what kind of data that does not return right?
Thank you.

Hi @Irwan the location is different it should be 15

AllanBerces_0-1771394081382.png

Date
TradeLocationDirect/InDirectWeek No:Count/DirectInDirect/LocationWKLY POB PLAN_rev2/15/2026 MICOInDirect712122/15/2026 MICODirect712122/15/2026 MICODirect712122/15/2026 MICODirect712122/15/2026 MICODirect712122/15/2026 MICOInDirect712122/15/2026 MICODirect712122/15/2026 MICODirect712122/15/2026 MICODirect712122/15/2026 MICODirect712122/15/2026 MICODirect712122/15/2026 MICODirect712122/11/2026 SMSDInDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/11/2026 SMSDDirect715 2/12/2026 SMSDInDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/12/2026 SMSDDirect715 2/15/2026 SMSDInDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect715122/15/2026 SMSDDirect71512
      
       

hello @AllanBerces 

 

what is your DAX in there?

 

seems different from my result.. there should be a value on 2/11/2026 while your screenshot show blank.

 

also for the bottom highlight, please adjust the DAX into this (the red one). I dont realize there will be a different 'Table'[Count/DirectInDirect/Location] value in same date.

WKLY POB PLAN =
var _Yearweek = YEAR('Table'[Date])&FORMAT(WEEKNUM('Table'[Date]),"00")
var _Mindate =
MINX(
    FILTER(
        'Table',
        YEAR('Table'[Date])&FORMAT(WEEKNUM('Table'[Date]),"00")=_Yearweek
    ),
    'Table'[Date]
)
var _IF =
IF(
    _Mindate='Table'[Date],
    _Mindate
)
Return
IF(
    'Table'[Date]=_Mindate,
    'Table'[Count/DirectInDirect/Location]
)

 

Thank you.

Hi @AllanBerces,

I created this code that seems to work

 

WKLY POB PLAN 2 =
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/DirectInDirect/Location] ) = 'Table'[Count/DirectInDirect/Location] && MINX ( _FilteredTable, 'Table'[Date] ) = 'Table'[Date],
        'Table'[Count/DirectInDirect/Location]
    )
 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Hi @FBergamaschi @Praful_Potphode @Irwan @v-ssriganesh thank you very much for the reply, work as i need

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.