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

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.

Reply
Analitika
Post Prodigy
Post Prodigy

Número porcentual fijo de la tabla relacionada

Así que la mesa principal es

Nombre (Name) Código de código ? Suma de sumas Contar

asdd ? zz ? 231 ? 2

dfsfds ? x ? 523 ? 2

mito ? y ? 768 ? 5

Tabla relacionada

% | Código

0,05 ? X

textVal1 | y

textVal2 ? Z

0,05 ? Zz

0.1 ? aa

Tengo medida que calcular algún porcentaje

measureAlgunos% - dividir (Suma, Contar)

Entonces tengo la segunda medida donde usar este porcentaje

measureMain á [measure1] - [measure2] * measureAlgunas%

Ahora, necesito escribir una nueva medida para tomar dinamicaly perecentage de la tabla relacionada si cumple con los criterios

measureDinamicPercentage ?

IF ( isDecimal(RelatedTable[%]) - True entonces

RelatedTable[%]

Más

if(RelatedTable[%] á textVal1 y luego 0.06 else [measureSome%])
)

Así que la medida principal debe ser
measureMain á [measure1] - [measure2] * measureDinamicPercentage

Así que tienen que escribir measureDinamicPercentage ?

1 ACCEPTED SOLUTION

Hola @Analitika

¿Esta?

measureSome% = DIVIDE(SUMX(ALL('Table'),'Table'[Sum]),SUMX(ALL('Table'),'Table'[Count]))

006.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

7 REPLIES 7
v-diye-msft
Community Support
Community Support

Hola @Analitika

Si tengo razón, puede consultar estos resultados:

measureDinamicPercentage = IF(IFERROR(VALUE(MAX('Table (2)'[%])),1)=1&&MAX('Table (2)'[%])="textVal1",0.06,IF(IFERROR(VALUE(MAX('Table (2)'[%])),1)<>1,MAX('Table (2)'[%]),[measureSome%]))

005.PNG

Pbix unido.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

TY para la respuesta.

measureAlgunos% - TotalCount / TotalSum

y lo mismo para cada fila,

Hola @Analitika

¿Esta?

measureSome% = DIVIDE(SUMX(ALL('Table'),'Table'[Sum]),SUMX(ALL('Table'),'Table'[Count]))

006.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

IFERROR(VALUE(MAX('Table (2)'[%])),1)-1&&MAX('Table (2)'[%])-"textVal1",
es complejo, ya que tengo una gran cantidad de valores para establecer manualmente, y necesito algo como:
SWITCH(
SELECTEDVALUE('Tabla (2)'[%]),
"textVal1", Value([medidaAlgunos%]),
"textVal2", 0,06%,
VALUE('Tabla (2)'[%])
)

Hola @Analitika

La misma lógica, la cambió como

measureSome% = DIVIDE(SUMX(ALL('Table'),'Table'[Sum]),SUMX(ALL('Table'),'Table'[Count]))

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
AiolosZhao
Memorable Member
Memorable Member

Hola @Analitika ,

¿Cuál es la medida1 y la medida2?

Por favor, muéstrame tu resultado deseado en una captura de pantalla o en una tabla.

Gracias.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




No importa lo que es measure1 y measure2, digamos que esto es 10 - 5

No puedo publicar nada más ya que no tengo medida de trabajo

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors