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 expertos,
Por favor, encuentre la descarga de PBIX aquí
Hay una medida para calcular "Count", "Units", "Sales", "Margin", los valores serán cambiados por la segmentación de fechas
Value by Class =
VAR currentClassTable = FILTER(ALLSELECTED('Sales table'[Product]), [Class]= SELECTEDVALUE('Pareto classification'[Product class]))
RETURN
SWITCH (SELECTEDVALUE('P&L'[P&L]),
"Count", COUNTROWS(currentClassTable)
, "Units" , SUMX(currentClassTable, CALCULATE(SUM('Sales table'[Units])))
, "Sales" , SUMX(currentClassTable, CALCULATE(SUM('Sales table'[Sales])))
, "Margin", SUMX(currentClassTable, CALCULATE(SUM('Sales table'[Margin]))))
Por ejemplo, a continuación, se espera que los productos de fondo círculo a 3, pero no puedo hacer eso, ¿alguien ayudaría, muchas gracias
@SimonChung_GGGG , Pruebe estos
VAR currentClassTable á FILTER(ALLSELECTED('Sales table'[Product]), [Class] in values('Pareto classification'[Product class]))
O
VAR currentClassTable á FILTER(ALLSELECTED('Sales table'[Product]), [Class] in allselected('Pareto classification'[Product class]))
pero si están relacionados mesa no es necesario hacer esto
@amitchandak ¡Muchas gracias! Sin embargo, no funciona, los resultados son los siguientes.
VAR currentClassTable á FILTER(ALLSELECTED('Sales table'[Product]), [Class] in values('Pareto classification'[Product class]))
VAR currentClassTable á FILTER(ALLSELECTED('Sales table'[Product]), [Class] in allselected('Pareto classification'[Product class]))
@SimonChung_GGGG, el cálculo del recuento es incorrecto
Tratar
Value by Class =
VAR currentClassTable = FILTER(ALLSELECTED('Sales table'[Product]), [Class] in values('Pareto classification'[Product class]))
RETURN
SWITCH (SELECTEDVALUE('P&L'[P&L]),
"Count", SUMX(currentClassTable, CALCULATE(DISTINCTCOUNT('Sales table'[Product])))// COUNTROWS(currentClassTable)
, "Units" , SUMX(currentClassTable, CALCULATE(SUM('Sales table'[Units])))
, "Sales" , SUMX(currentClassTable, CALCULATE(SUM('Sales table'[Sales])))
, "Margin", SUMX(currentClassTable, CALCULATE(SUM('Sales table'[Margin]))))
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 |