March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,,
my below post marked as spam, but it is not!
please your support:
Regards,
Solved! Go to Solution.
Hi @imjeed ,
I create a table as you mentioned.
Then I create a calculated column.
DateTime =
'Table'[Date] & " " & 'Table'[Time]
Next I create another calculated column.
DateTime Difference =
DATEDIFF (
CALCULATE (
MIN ( 'Table'[DateTime] ),
ALLEXCEPT ( 'Table', 'Table'[Category] )
),
'Table'[DateTime],
MINUTE
)
Measure =
CALCULATE(
SUM('Table'[Amount]),
FILTER(
ALLEXCEPT('Table', 'Table'[Category]),
'Table'[DateTime Difference] <= 30
)
)
Finally I create a new table and here is the DAX code.
Table 2 =
SELECTCOLUMNS(
'Table',
"Category", 'Table'[Category],
"Measure", 'Table'[Measure]
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @imjeed ,
I create a table as you mentioned.
Then I create a calculated column.
DateTime =
'Table'[Date] & " " & 'Table'[Time]
Next I create another calculated column.
DateTime Difference =
DATEDIFF (
CALCULATE (
MIN ( 'Table'[DateTime] ),
ALLEXCEPT ( 'Table', 'Table'[Category] )
),
'Table'[DateTime],
MINUTE
)
Measure =
CALCULATE(
SUM('Table'[Amount]),
FILTER(
ALLEXCEPT('Table', 'Table'[Category]),
'Table'[DateTime Difference] <= 30
)
)
Finally I create a new table and here is the DAX code.
Table 2 =
SELECTCOLUMNS(
'Table',
"Category", 'Table'[Category],
"Measure", 'Table'[Measure]
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ryan_mayu
Thanks for your replay
row number 7 should not be included becuase it's more than 30 Min in same day
first transaction of category B is 1-2-2023 20:00
last transaction of category B is 1-2-2023 20:40
so the last transaction should not included becuase it's more than 30MIN
thanks in advnace again.
then you can try this
Proud to be a Super User!
you can combine date time column
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
106 | |
98 | |
65 | |
54 |