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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Ayuda con USERRELATIONSHIP ()

Tengo el siguiente código:

VAR HorasPlanta = IF(CALCULATE(SUM(Zon2[Horas JUNIO-19]);USERELATIONSHIP(SBH_2[SBH];Zon2[Sistema de Bombeo de Hidrocarburos(SBH)]);Zon2[Unidad de Bombeo Indisponible]="Todas las Unidades")=BLANK();0;CALCULATE(SUM(Zon2[Horas JUNIO-19]);USERELATIONSHIP(SBH_2[SBH];Zon1[Sistema de Bombeo de Hidrocarburos(SBH)]);Zon2[Unidad de Bombeo Indisponible]="Todas las Unidades"))
RETURN

VAR HorasSBH = IF(CALCULATE(SUM(Zon2[Horas JUNIO-19]);USERELATIONSHIP(Zon2[Estación];SBH_2[PLANTA]);Zon2[Sistema de Bombeo de Hidrocarburos(SBH)]="Todos_los_SBH")=BLANK();0;CALCULATE(SUM(Zon2[Horas JUNIO-19]);USERELATIONSHIP(Zon2[Estación];SBH_2[PLANTA]);Zon2[Sistema de Bombeo de Hidrocarburos(SBH)]="Todos_los_SBH"))
RETURN

y tener las siguientes relaciones:

12.PNG

Pero aparece el siguiente error:

La función USERELATIONSHIP solo puede utilizar las dos referencias de columnas que participan en la relación.

¿Sabes por qué?

0 REPLIES 0

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors