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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Sharma0815
Helper II
Helper II

Date diffs in the same column

Hi Everyone,

 

I have a dataset where I am trying to calculate the user response time to dealer note using the note date of every action.

 

Here is my sample data look like, I've calculated this in hive query using lag, lead, and min window functions, but my user wants to see this in Power BI.

 

This is what I tried so far.

 

I've created a "user note date" measure to get the first response of the User response 

user note date = CALCULATE(MIN(Query1[Note Date]),ALLEXCEPT(Query1,Query1[incident],Query1[Action Type]),
LEFT(Query1[lastuser],1) in {"U"} )
 
Dealer Note Date  = 
CALCULATE(
MIN(Query1[pdate]),
FILTER(ALLEXCEPT(Query1,Query1[incident],Query1[action_type]),
Query1[action_type] in {
"DLR_CUST_Update"
))

 

I am getting this error from Dealer Note Date Measure, I am not understanding what's wrong with the above calculation.

 error: A single value for column 'Action Type' in table 'Query1' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min

 

incidentlast userAction TypeNote DateResponse Time in Hours
4815911 DLR_CUST_Update9/5/2020 9:20 
4815911U01PAAAVEH_STAT_CHANGE9/9/2020 16:08102
4815911 DLR_CUST_Update9/17/2020 09:40 
4815911U01PAAAVEH_STAT_CHANGE9/17/2020 11:502
4815911U01PAAAVEH_STAT_CHANGE9/18/2020 11:47 
4815911 DLR_CUST_Update9/19/2020 09:47 
4815911U01PAAAVEH_STAT_CHANGE9/20/2020 07:472



1 ACCEPTED SOLUTION
dedelman_clng
Community Champion
Community Champion

Hi @Sharma0815  - 

 

Try this measure.  The ALLEXCEPT inside the filter "disconnects" from the original Query1 table, causing the error message you are seeing.

 

DealerNoteDate =
CALCULATE (
    MIN ( Query1[Note Date] ),
     KEEPFILTERS ( Query1[incident] ),
     FILTER (
        Query1,
        Query1[Action Type] IN { "DLR_CUST_Update" }
    )
)

 

2020-10-26 12_53_44-Window.png

Hope this helps

David

View solution in original post

1 REPLY 1
dedelman_clng
Community Champion
Community Champion

Hi @Sharma0815  - 

 

Try this measure.  The ALLEXCEPT inside the filter "disconnects" from the original Query1 table, causing the error message you are seeing.

 

DealerNoteDate =
CALCULATE (
    MIN ( Query1[Note Date] ),
     KEEPFILTERS ( Query1[incident] ),
     FILTER (
        Query1,
        Query1[Action Type] IN { "DLR_CUST_Update" }
    )
)

 

2020-10-26 12_53_44-Window.png

Hope this helps

David

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.