Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello
I have a table with several columns. I would like to mark in bold the last row (data sorted in descending order by Col01) in each day. Of course, the background color of such row can be changed instead of bold.
In the example array:
Col01 | Col02 | Col03 | Col04
2021-05-25 20:33:05 | 2021-05-25 | Abc | Def
2021-05-25 12:03:44 | 2021-05-25 | Ghi | Jklm
2021-05-25 12:00:16 | 2021-05-25 | No | Nooooo
2021-05-24 19:22:08 | 2021-05-24 | Qwer | Ty
2021-05-24 19:07:04 | 2021-05-24 | Zx | Yzabc
2021-05-24 18:58:06 | 2021-05-24 | Cfff | Fggh
2021-05-24 18:58:01 | 2021-05-24 | Pppp | Wwww
2021-05-24 17:47:17 | 2021-05-24 | Aaaa | Zzzz
2021-05-23 18:44:44 | 2021-05-23 | Jjjj | Iiiii
2021-05-23 18:33:33 | 2021-05-23 | Qwer | Qw
2021-05-23 18:32:23 | 2021-05-23 | We | Are
2021-05-22 02:00:10 | 2021-05-22 | Wi | Fi
I would like to have rows 1, 4, 9 and 12 marked.
How can I do this?
Solved! Go to Solution.
Here is one way to do it. Make the measure below, and use it as the Field Value when conditional formatting the font color of each column. Here is an example with it on the first column.
Bold Max =
VAR thistime =
MIN ( Bold[Col01 ] )
VAR maxtime =
CALCULATE ( MAX ( Bold[Col01 ] ), ALL ( Bold ), VALUES ( Bold[ Col02 ] ) )
RETURN
IF ( thistime = maxtime, "Blue", "Black" )
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi @Anonymous,
You can use the following step:
Create measure as:
MAX_DAY =
VAR maxtime_day =
CALCULATE ( MAX ( 'Table'[Col01 ]),FILTER( ALL ('Table'), 'Table'[ Col02 ]=MAX('Table'[ Col02 ]) ))
RETURN
IF ( MAX('Table'[Col01 ]) = maxtime_day, "Yellow", "White" )
Here is the output:
Currently it is not supported to apply on row with condition formating, you can apply on columns.
You can try the attached pbix.
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous,
You can use the following step:
Create measure as:
MAX_DAY =
VAR maxtime_day =
CALCULATE ( MAX ( 'Table'[Col01 ]),FILTER( ALL ('Table'), 'Table'[ Col02 ]=MAX('Table'[ Col02 ]) ))
RETURN
IF ( MAX('Table'[Col01 ]) = maxtime_day, "Yellow", "White" )
Here is the output:
Currently it is not supported to apply on row with condition formating, you can apply on columns.
You can try the attached pbix.
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Here is one way to do it. Make the measure below, and use it as the Field Value when conditional formatting the font color of each column. Here is an example with it on the first column.
Bold Max =
VAR thistime =
MIN ( Bold[Col01 ] )
VAR maxtime =
CALCULATE ( MAX ( Bold[Col01 ] ), ALL ( Bold ), VALUES ( Bold[ Col02 ] ) )
RETURN
IF ( thistime = maxtime, "Blue", "Black" )
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
When creating a measure I get an error at EARLIER: "Parameter is not the correct type" 😞
How can I resolve this?
I'm using Direct Query, and the Col01 column has a Date/time data type.
@Anonymous , You can not mark bold, You can do conditional formatting of font color or background color
First, create a date column from col1
Date = [Timestamp].date
or
Date = date(year([Timestamp]),month([Timestamp]),day([Timestamp]))
Then create a rank column
Daily Rank =
RANKX(
FILTER(
Table,
Table[Date]=EARLIER(Table[Date])
),
Table[Col1],,desc,dense
)
In conditional formatting rule based, color Rank =1
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
User | Count |
---|---|
77 | |
74 | |
63 | |
61 | |
45 |
User | Count |
---|---|
108 | |
102 | |
93 | |
83 | |
64 |