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
oscarmqz
Advocate II
Advocate II

Flag first run time by report, day and time

Hi, I'm trying to add a column to flag the first time a report ran by day to get something like this

 

REPORT_NMSTART_TS1st Time run
AMS_PPS_TRADE_BCKLOG_DTL12/1/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/1/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/4/2017 15:00 1
AMS_PPS_TRADE_BCKLOG_DTL12/5/2017 8:00 1
AMS_PPS_TRADE_BCKLOG_DTL12/6/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/6/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/6/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/7/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/7/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/8/2017 8:001
AMS_PPS_TRADE_BCKLOG_DTL12/8/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/8/2017 15:00 
AMS_PPS_TRADE_BCKLOG_DTL12/9/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/9/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/9/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/10/2017 8:001
AMS_PPS_TRADE_BCKLOG_DTL12/10/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/10/2017 15:00 
AMS_PPS_TRADE_BCKLOG_DTL12/11/2017 9:251
AMS_PPS_TRADE_BCKLOG_DTL12/12/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/12/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/12/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/12/2017 15:00 
AMS_PPS_TRADE_BCKLOG_DTL12/13/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/13/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/13/2017 15:00 
PREV_DAYS_ORDERS12/1/2017 2:001
PREV_DAYS_ORDERS12/2/2017 2:001
PREV_DAYS_ORDERS12/5/2017 2:001
PREV_DAYS_ORDERS12/7/2017 2:001
PREV_DAYS_ORDERS12/8/2017 2:001
PREV_DAYS_ORDERS12/8/2017 21:56 
PREV_DAYS_ORDERS12/9/2017 2:001
PREV_DAYS_ORDERS12/10/2017 2:001
PREV_DAYS_ORDERS12/11/2017 2:001
PREV_DAYS_ORDERS12/12/2017 2:001
PREV_DAYS_ORDERS12/13/2017 2:001

 

Thanks in advance for your help!

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @oscarmqz,


You can try to use below formula to create a calculate column to tag first date.

First Time Flag =
VAR first_time =
    CALCULATE (
        MINX ( VALUES ( Table1[START_TS] ), [START_TS] ),
        Table1[REPORT_NM] = EARLIER ( [REPORT_NM] ),
        DATEVALUE ( Table1[START_TS] ) = DATEVALUE ( EARLIER ( Table1[START_TS] ) )
    )
RETURN
    IF ( [START_TS] = first_time, 1 )

1.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @oscarmqz,


You can try to use below formula to create a calculate column to tag first date.

First Time Flag =
VAR first_time =
    CALCULATE (
        MINX ( VALUES ( Table1[START_TS] ), [START_TS] ),
        Table1[REPORT_NM] = EARLIER ( [REPORT_NM] ),
        DATEVALUE ( Table1[START_TS] ) = DATEVALUE ( EARLIER ( Table1[START_TS] ) )
    )
RETURN
    IF ( [START_TS] = first_time, 1 )

1.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
oscarmqz
Advocate II
Advocate II

Hi, I'm trying to flag the first time a report runs every single day. I'm pretty new to DAX so I'm having a hard time. I've tried using earlier and rankx.

 

Example

 

REPORT_NMSTART_TS1st Time run
AMS_PPS_TRADE_BCKLOG_DTL12/1/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/1/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/4/2017 15:00 
AMS_PPS_TRADE_BCKLOG_DTL12/5/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/6/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/6/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/6/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/7/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/7/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/8/2017 8:001
AMS_PPS_TRADE_BCKLOG_DTL12/8/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/8/2017 15:00 
AMS_PPS_TRADE_BCKLOG_DTL12/9/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/9/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/9/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/10/2017 8:001
AMS_PPS_TRADE_BCKLOG_DTL12/10/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/10/2017 15:00 
AMS_PPS_TRADE_BCKLOG_DTL12/11/2017 9:251
AMS_PPS_TRADE_BCKLOG_DTL12/12/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/12/2017 8:00 
AMS_PPS_TRADE_BCKLOG_DTL12/12/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/12/2017 15:00 
AMS_PPS_TRADE_BCKLOG_DTL12/13/2017 3:001
AMS_PPS_TRADE_BCKLOG_DTL12/13/2017 13:00 
AMS_PPS_TRADE_BCKLOG_DTL12/13/2017 15:00 
PREV_DAYS_ORDERS12/1/2017 2:001
PREV_DAYS_ORDERS12/2/2017 2:001
PREV_DAYS_ORDERS12/5/2017 2:001
PREV_DAYS_ORDERS12/7/2017 2:001
PREV_DAYS_ORDERS12/8/2017 2:001
PREV_DAYS_ORDERS12/8/2017 21:56 
PREV_DAYS_ORDERS12/9/2017 2:001
PREV_DAYS_ORDERS12/10/2017 2:001
PREV_DAYS_ORDERS12/11/2017 2:001
PREV_DAYS_ORDERS12/12/2017 2:001
PREV_DAYS_ORDERS12/13/2017 2:001

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.