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.
Hola a todos
Estoy tratando de obtener medidas dinámicas para trabajar donde los usuarios pueden elegir 1 opción de la tabla "Valor de visualización" y 1 opción de la tabla "Intervalo de fechas".
Por ejemplo:
Si se selecciona "Por TCE" y "YTD", se mostrará el precio yTD TCE
Si se selecciona "Por TCE" y "Último mes", se mostrará el precio del mes pasado
Si se selecciona "Importe total" y "YTD", se mostrarán los ingresos de YTD
etcetera
He creado mis 2 tablas:
Puedo conseguir que funcione si sólo hay una mesa, pero con la 2a mesa lo está haciendo difícil.
Dynamic YTD or Month - Price =
IF(
SELECTEDVALUE('Date Range Option'[Date Range]) = "YTD",
([YTD TCE Price]),
([Last Month TCE Price])
)
Idealmente otra línea que diga "if(valor seleccionado " "TCE") Then "
Intenté hacer una columna calculada IF Statement uniendo las dos tablas juntas, pero termina mostrando en blanco.
Dynamic IF Statement =
IF('Aggregation Option'[Display Value] = "YTD",
IF('Aggregation Option'[Display Value] = "Per TCE",
[YTD TCE Price],
IF('Aggregation Option'[Display Value] = "Last Month",
IF('Aggregation Option'[Display Value] = "Per TCE",
[Last Month TCE Price],
1
))))
¡Cualquier ayuda sería genial!
Gracias
Solved! Go to Solution.
logró que funcionara usando el siguiente código:
Dynamic Options =
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "Last Month",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Per TCE"
),
[Last Month TCE Price],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "Last Month",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Total Amount"
),
[Last Month Revenue NZD],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "YTD",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Total Amount"
),
[YTD Sales NZD],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "YTD",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Per TCE"
),
[YTD TCE Price],
0
)
)))
Usar SWITCH Funciton
•SWITH(TRUE(),
SELECTEDVALUE(
AND([valor de visualización]-"Por TCE", [Intervalo de fechas]-"YTD"), [YTD TCE PRICE) ,
AND([valor de visualización]-"Por TCE", [Intervalo de fechas]-"último mes"), [Precio de la ECT del último mes), [Precio de la ECT del último mes), [Precio de la ECT del último mes), [Precio de la ECT del último mes), [Precio de la ECT del último mes), [Precio de la ECT del último mes), [Precio de la ECT
1))
Esto le ayudará
Proud to be a Super User!
@VijayP Gracias por su respuesta!
He intentado la fórmula siguiente, aunque estoy recibiendo un error.
@VijayP Otra pregunta, en columna calculada, ¿por qué no puedo elegir la tabla de intervalo de fechas en mi fórmula, como sugeriste? ¿Es porque no tengo ninguna relación entre los dos?
logró que funcionara usando el siguiente código:
Dynamic Options =
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "Last Month",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Per TCE"
),
[Last Month TCE Price],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "Last Month",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Total Amount"
),
[Last Month Revenue NZD],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "YTD",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Total Amount"
),
[YTD Sales NZD],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "YTD",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Per TCE"
),
[YTD TCE Price],
0
)
)))
Hola @TheBlacklist ,
Me alegra saber que este problema ha sido resuelto. Usted puede ayudar a aceptar la solución anterior. Su contribución es muy apreciada.
Saludos
Icey
@TheBlacklist Espero que mi idea haya funcionado y si lo crees, por favor selecciona mi respuesta como solución y comparte tus Kudos.
También puedes ver mis Vidoes en www.youtube.com/perepavijay y visitar mi Perfil de LinkedIne
saludos
Vijay Perepa
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |