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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Flagging date that meets a certain date criteria

Hi, I have been playing a bit around but struggling to write a dax query that will flag transaction for the first 4 days of each month.  

 

Original Data  
GL DateAmount 
1/05/2023100 
3/05/2023200 
24/05/2023300 
1/05/2023400 
   
Output  
GL DateAmoutAfter month end
1/05/2023100Yes
3/05/2023200Yes
24/05/2023300No
1/05/2023400Yes
2 ACCEPTED SOLUTIONS
eliasayyy
Memorable Member
Memorable Member

Hello please follow

Flag = 
VAR _day = DAY('Table'[GL Date])
RETURN
IF(
    _day <=4,"Yes","No")



annonymous1999_0-1683702385645.png

 

View solution in original post

FreemanZ
Super User
Super User

hi @Anonymous 

try to add a calculated column like:

Column = 
IF(
    DAY([Date])>4,
    "No", "Yes"
)

it worked like:

FreemanZ_0-1683702726120.png

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

if you need a measure, try to plot the columns with a measure like:

Measure = 
IF(
    DAY(MAX(data[Date]))>4,
    "No", "Yes"
)

it worked like:

FreemanZ_1-1683702894966.png

FreemanZ
Super User
Super User

hi @Anonymous 

try to add a calculated column like:

Column = 
IF(
    DAY([Date])>4,
    "No", "Yes"
)

it worked like:

FreemanZ_0-1683702726120.png

eliasayyy
Memorable Member
Memorable Member

Hello please follow

Flag = 
VAR _day = DAY('Table'[GL Date])
RETURN
IF(
    _day <=4,"Yes","No")



annonymous1999_0-1683702385645.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.