Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

¿Cómo colorear la última barra de color rojo?

Hola a todos

Mi gráfico de barras para Yr capaz de resaltar el color rojo de la última barra. usando la siguiente expresión :-

Color Last Bar = var _max = maxx(ALLSELECTED('Date'), 'Date'[YrMth Sort]) return if(max('Date'[YrMth Sort]) = _max, "Red")

Pero mi bar para YrMth no es capaz de hacer resaltar para el último color rojo barra.

admin11_0-1616475678663.png

¿Puedo saber dónde ir mal? He comprobado que el ajuste de ambos es el mismo.

El siguiente enlace es mi archivo PBI :-

https://www.dropbox.com/s/56ydx6clm2e5wpx/PBT_V2021_392%20TI_SI_GL%20how%20to%20make%20YrMth%20last%...

Paul

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

@admin11 , Puede crear una medida de color como esta y utilizarla en formato condicional mediante la opción de valor de campo

Medida =
var _max = maxx(allselected(Date), Date[Year])
devolución
if(max(Date[año]) = _max, "rojo", "azul")

también consulte: https://community.powerbi.com/t5/Community-Blog/Display-Label-Only-on-the-Last-Data-Point-of-the-Lin...

@amitchandak

Gracias por compartir

Utilizo su expresión, obteré un error :-

admin11_0-1616477211154.png

No estoy situado valor de año en date tab.

@admin11 , La tabla de fechas vendrá en una sola cita

'Fecha'

Ejemplo

Medida =
var _max = maxx(allselected('Date'), 'Date'[Year])
devolución
if(max('Date'[año]) = _max, "rojo", "azul")

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.