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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MdJ83
Helper II
Helper II

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
Super User
Super User

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 @MdJ83 

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 @MdJ83 

try to add a calculated column like:

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

it worked like:

FreemanZ_0-1683702726120.png

eliasayyy
Super User
Super User

Hello please follow

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



annonymous1999_0-1683702385645.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors