This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hola
Quiero proporcionar una comparación del valor de ventas a partir de cada fecha.
ejemplo:
| Fecha del informe | Valor de los contratos |
| 16/06/2021 | 10500 |
| 20/06/2021 | 13100 |
| 29/06/2021 | 9800 |
| ... etc | ... etc |
El usuario seleccionará dos fechas para comparar (por ejemplo, seleccionará 16/06/2021 & 20/06/2021). Tenga en cuenta que también hay columnas que muestran el número de contrato, el nombre del cliente, etc. En la siguiente tabla - para mantenerlo simple - mostré los valores agregados.
He creado una medida a continuación:
New Contracts Financial Reporting =
VAR _minDate = min(Portfolio[Report Date])
VAR _maxDate = max(Portfolio[Report Date])
VAR _minDateValue = calculate([Annualized Value],Portfolio[Report Date]=_minDate)
VAR _maxDateValue = calculate([Annualized Value],Portfolio[Report Date]=_maxDate)
RETURN
_maxDateValue-_minDateValue
Esta medida funciona bien con un gráfico de barras con nombre de cliente en el eje y por encima de la medida como valores. He creado dos gráficos de barras como este.
El primero se filtra (panel de filtro) con la condición "New Contracts Financial Reporting is less than 0", el otro se filtra con "New Contracts Financial Reporting is greater than 0".
Así que tengo la evolución entre dos fechas seleccionadas por usuario desglosadas por cliente (puedo ver dónde se ha aumentado y disminuido el valor del contrato / ventas).
Lo que también me gustaría obtener es un resumen en card visuals. De forma similar a los gráficos de barras, la primera tarjeta debe mostrar la suma de los contratos/ventas aumentados y la segunda tarjeta debe mostrar la suma de los contratos disminuidos. No puedo aplicar el mismo filtro en la medida que lo hice en el gráfico de barras.
Creo que tendría que crear una nueva medida, ¿puede alguien ayudar con esto?
Solved! Go to Solution.
[Positive Diffs Total] =
SUMX(
SUMMARIZE(
FactTable,
// This CustomerID must be
// unique. It's the key to
// the Customer dimension.
Customers[CustomerID]
),
MAX(
// blank is treated as 0
// but will not display
BLANK(),
[New Contracts Financial Reporting]
)
)
[Negative Diffs Total] =
SUMX(
SUMMARIZE(
FactTable,
// This CustomerID must be
// unique. It's the key to
// the Customer dimension.
Customers[CustomerID]
),
MIN(
// blank is treated as 0
// but will not display
BLANK(),
[New Contracts Financial Reporting]
)
)
Hay @marekmarek ,
Puede utilizar las dos medidas siguientes para dos tarjetas:
increased contracts = SUMX(FILTER( SUMMARIZE(FactTable,FactTable[CustomerID],"_increasedvalue",[New Contracts Financial Reporting]),[_increasedvalue]>=0),[_increasedvalue])
Decreased contracts = SUMX(FILTER( SUMMARIZE(FactTable,FactTable[CustomerID],"_decreasedvalue",[New Contracts Financial Reporting]),[_decreasedvalue]<=0),[_decreasedvalue])
Si esta publicación ayuda, entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Saludos
Dedmon Dai
[Positive Diffs Total] =
SUMX(
SUMMARIZE(
FactTable,
// This CustomerID must be
// unique. It's the key to
// the Customer dimension.
Customers[CustomerID]
),
MAX(
// blank is treated as 0
// but will not display
BLANK(),
[New Contracts Financial Reporting]
)
)
[Negative Diffs Total] =
SUMX(
SUMMARIZE(
FactTable,
// This CustomerID must be
// unique. It's the key to
// the Customer dimension.
Customers[CustomerID]
),
MIN(
// blank is treated as 0
// but will not display
BLANK(),
[New Contracts Financial Reporting]
)
)
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.