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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Need help improving DAX calculations for accurate results in Power BI from single date column!

Hello Power BI community!

I'm seeking your expertise to help me improve two DAX calculations that I'm currently using to calculate the receiving and sending (handling) dates for a ticket table. The data I'm dealing with is related to a list of tickets that are received and then treated by technicians on different dates, unfortunately, I'm only provided with one date column which aggregates all actions performed on a specific ticket (which is DateTime), and a ticket may appear repetitively but with different receiving and sending dates (which should be taken into account of course). 

Here's a snapshot from the raw data table:

Feel free to download these tables from here: "https://smallpdf.com/file#s=c745e973-29a0-4dbd-85ab-2472d7379858"

Jack_Reacher_0-1685550171813.png


Below are the DAX calculations I'm using to produce the results (which are now inaccurate)

ReceiverDate = 
CALCULATE(
MIN(WEEKLY_IDs[DateTime]),
FILTER(
ALL('WEEKLY_IDs'),
'WEEKLY_IDs'[SenderID] = EARLIER('WEEKLY_IDs'[ReceiverID]) &&
'WEEKLY_IDs'[ReceiverID] = EARLIER('WEEKLY_IDs'[SenderID]) &&
'WEEKLY_IDs'[Ticket_ID] = EARLIER('WEEKLY_IDs'[Ticket_ID])
)
)

SenderDate =
CALCULATE(
MAX([DateTime]),
FILTER(
ALL('WEEKLY_IDs'),
'WEEKLY_IDs'[SenderID] = EARLIER('WEEKLY_IDs'[SenderID]) &&
'WEEKLY_IDs'[ReceiverID] = EARLIER('WEEKLY_IDs'[ReceiverID]) &&
'WEEKLY_IDs'[Ticket_ID] = EARLIER('WEEKLY_IDs'[Ticket_ID])
)
)
 

Jack_Reacher_2-1685550363911.png


These are the end results I'm seeking to accomplish with these two DAX calculations:

Jack_Reacher_3-1685550407765.png

 

 

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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