Forum Discussion
Creating a new table based on multiple factors
- 8 years ago
Happened to find a new source that allowed me to achieve what I needed to achieve:
https://community.powerbi.com/t5/Desktop/Filter-Query-or-create-new-table-based-on-first-date-duplicate/td-p/132473Solution:
Table2 =
VAR T1 = SUMMARIZE('Table1'[TicketNumber];"First action"; MIN('Table1'[ActivityTime]))
VAR T2 = FILTER(NATURALINNERJOIN('Table1';T1); 'Table1'[TimeDifference] > 'Table1'[PriorityTimes])
RETURN T2Thanks v-yuta-msft for trying to help, you did put me on the right track!
Hi Ssmit,
Try DAX formula below:
new table =
FILTER (
table,
table[activityTime] = MIN ( table[activityTime] )
&& tabel[timeDifference] > table[priorityTime]
)
Regards,
Jimmy Tao
Hello Jimmy,
Unfortunately this returns an empty table.
I think the reason for this is the way I put together the priorityTime and TimeDifference.
Both are in text format because I wanted both of them to show the full time value instead of starting over when the time goes past 23:59. I'm using CONCATENATE and TRUNC to piece them together.
- Ssmit8 years agoFrequent Visitor
Decided to keep playing around with it for a bit after I was done with some other stuff I had to do today.
timeDifference > priorityTime works just fine, I'm guessing that the other part of the filter Jimmy suggested somehow didn't get picked up when making the new table
- Ssmit8 years agoFrequent Visitor
Happened to find a new source that allowed me to achieve what I needed to achieve:
https://community.powerbi.com/t5/Desktop/Filter-Query-or-create-new-table-based-on-first-date-duplicate/td-p/132473Solution:
Table2 =
VAR T1 = SUMMARIZE('Table1'[TicketNumber];"First action"; MIN('Table1'[ActivityTime]))
VAR T2 = FILTER(NATURALINNERJOIN('Table1';T1); 'Table1'[TimeDifference] > 'Table1'[PriorityTimes])
RETURN T2Thanks v-yuta-msft for trying to help, you did put me on the right track!