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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
krichmond
Helper IV
Helper IV

Need help debugging a date based DAX formula

I tried to populate dates into a field called "Media Due" using certain criteria using the DAX formula below and based on what I can see, there aren't any visible errors with the formula (at the bottom of the DAX box). However, when looking at the report itself, nothing is populating in the "Media Due" field which contains the DAX formula. Any idea why this is happening? What am I doing wrong here?

 

Screenshot Of DAX Formula.png

 

Screenshot Of Missing Data.png

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @krichmond 

 

Is [Media Due] a measure? If so, you may try adding MAX function to monthnumber and yearnumber in the formula. Just like below. 

Media Due =
SWITCH (
    TRUE (),
    MAX ( mv_perfex[mediatype] ) = "Digital" && MAX ( dimstartdate[monthnumber] ) = 1 && MAX ( dimstartdate[Yearnumber] ) = 2023, "12/14/2022",
    BLANK ()
)

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @krichmond 

 

Is [Media Due] a measure? If so, you may try adding MAX function to monthnumber and yearnumber in the formula. Just like below. 

Media Due =
SWITCH (
    TRUE (),
    MAX ( mv_perfex[mediatype] ) = "Digital" && MAX ( dimstartdate[monthnumber] ) = 1 && MAX ( dimstartdate[Yearnumber] ) = 2023, "12/14/2022",
    BLANK ()
)

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.