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.
I have data that shows the date and time for file reciept; I am trying to create cards that show what the EARLIEST file receipt time was and what the LATEST file receipt time was in the given set of data. I have researched for quite some time and have not found anything to point me to the cause of why this is not reporting correctly... please help!
Here is a sample of the data I am using:
The earliest time a file was received should be reporting as from 1/24/2023 at 12:01:59 AM and the latest time a file was received should be reporting as 2/2/2023 at 12:16:00 PM; however, when I create a card visual and tell it to report earliest and latest from the Last File Receipt Time field, it is reporting this:
I have even attempted to create new measures with MIN and MAX functions and it reports the same way.
Solved! Go to Solution.
@DataIsMyMN Oh, you want the items with the min or max time regardless of date. If that is the case see attached PBIX below signature.
Earliest =
VAR __Table =
ADDCOLUMNS(
'Table',
"Time", [Last File Receipt Time] - TRUNC([Last File Receipt Time])
)
VAR __MinTime = MINX(__Table, [Time])
VAR __Result = MINX(FILTER(__Table, [Time] = __MinTime),[Last File Receipt Time])
RETURN
__Result
Latest =
VAR __Table =
ADDCOLUMNS(
'Table',
"Time", [Last File Receipt Time] - TRUNC([Last File Receipt Time])
)
VAR __MaxTime = MAXX(__Table, [Time])
VAR __Result = MINX(FILTER(__Table, [Time] = __MaxTime),[Last File Receipt Time])
RETURN
__Result
@Greg_Deckler yes, it is a Date/Time column. I've tried changing the display format to only show the time, but that doesn't fix it.
@DataIsMyMN Oh, you want the items with the min or max time regardless of date. If that is the case see attached PBIX below signature.
Earliest =
VAR __Table =
ADDCOLUMNS(
'Table',
"Time", [Last File Receipt Time] - TRUNC([Last File Receipt Time])
)
VAR __MinTime = MINX(__Table, [Time])
VAR __Result = MINX(FILTER(__Table, [Time] = __MinTime),[Last File Receipt Time])
RETURN
__Result
Latest =
VAR __Table =
ADDCOLUMNS(
'Table',
"Time", [Last File Receipt Time] - TRUNC([Last File Receipt Time])
)
VAR __MaxTime = MAXX(__Table, [Time])
VAR __Result = MINX(FILTER(__Table, [Time] = __MaxTime),[Last File Receipt Time])
RETURN
__Result
@DataIsMyMN Is that column a Date/Time column?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
74 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |