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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have below data
Run | RUNID | Job TerminalState | time |
XYZ | 1 | Failed | Thu, 13 Feb 2025 13:19:05 |
XYZ | 2 | Failed | Thu, 13 Feb 2025 13:03:42 |
XYZ | 3 | Success | Fri, 07 Feb 2025 07:21:55 |
XYZ | 4 | Failed | Fri, 07 Feb 2025 07:07:52 |
XYZ | 5 | Failed | Wed, 05 Feb 2025 15:43:51 |
XYZ | 6 | Success | Fri, 17 Jan 2025 07:38:35 |
XYZ | 7 | Success | Fri, 17 Jan 2025 07:35:55 |
I need output in below format:
Run | Job TerminalState |
XYZ | Failed Failed Success Failed Failed |
Solved! Go to Solution.
Can add this to a table in your report with Run id to get the last 5 status
measure =
CONCATENATEX(
TOPN( 5, table1, table1[Time], desc )
, table1[JobTerminalState], " ", table1[Time], desc
)
On above screenshot table is filtered to top 5, if you do not want to do that then use the below DAX.
Proud to be a Super User!
Can add this to a table in your report with Run id to get the last 5 status
measure =
CONCATENATEX(
TOPN( 5, table1, table1[Time], desc )
, table1[JobTerminalState], " ", table1[Time], desc
)
Thanks Thats is working 😊 One more thing, If this status we would like to show with Icon then ?
I have tried but it is showing only one status with icon
Proud to be a Super User!
measure =
CONCATENATEX(
TOPN( 5, table1, table1[Time], desc )
, SWITCH(
table1[JobTerminalState],
"Failed", "❌",
"Cancelled", "⚫",
"Succeeded", "✔️"
),
, " ", table1[Time], desc
)
Thanks. But not working DAX gives error for below
" ", table1[Time], desc
I tried removing it but gives no data
I have a extra , on that row at the start, need to remove that
Yes removed but no data it gives.
ah, You might have to find and enter emoji's yourself as the forum converts them into a funny format
https://emojipedia.org/check-mark
Thanks...one last question. If I have to keep only the unique value in status then What I have to give?
measure =
CONCATENATEX(
DISTINCT(
SELECTCOLUMNS(
TOPN( 5, table1, table1[Time], desc )
,table1[JobTerminalState]
)
)
, SWITCH(
table1[JobTerminalState],
"Failed", "emoji 1",
"Cancelled", "emoji 2",
"Succeeded", "emoji 3"
),
" "
)
I am using below DAX:
Run | RUN ID | Job TerminalState |
XYZ | 1,2,1,1 | Failed Failed Success Failed Failed |
I am able to get the output like this. But I need to show only recent run status (like only 5 recent states)
I have used the DAX to get this:
Run | Job TerminalState |
XYZ | Failed Failed Success Failed Failed Failed success Failed |
User | Count |
---|---|
97 | |
73 | |
69 | |
43 | |
23 |