Forum Discussion
migueldfr
1 year agoHelper IV
Building a Matrix with Asymmetrical Columns and Rows in Power BI
Hello folks, I am sttrugling with this sheet in this small concept I would like to create a pivot table and a bar chart upper which describe the table. Pivot table should contains the val...
migueldfr
1 year agoHelper IV
Hello Anonymous
thank you for you response.
I guess we are close to the result.
I would like to replicate this table made in excel.
The point here, is depend on what you are using, if you using if you use pivot table you are gonna see it like this:
ROWS = QUARTER
COLUMNS = YEAR
| QUARTER | 2022 | 2023 | 2024 | Diferencia | Varianza |
| Q1 | 1593980 | 196626146 | 176830989 | ||
| Q2 | 159388242 | 17491518 | 166886332 | ||
| Q3 | 201556431 | 228064979 | 193844812 | ||
| Q4 | 17388848 | 178882189 | 18604966 |
I would appreciate your help
Thank you in advance
migueldfr
1 year agoHelper IV
I keep working and I found another way to approah.
Building a Matrix with Asymmetrical Columns and Rows in Power BI
This what I am using.
I created a table to do it and aslo a measure.
Valores_A_mostrar =
VAR Anioseleccionado = VALUE(SELECTEDVALUE(x_Encabezados_tabla[Orden])) -- Aseguramos que Anioseleccionado es un valor numérico
VAR AnioActual = YEAR(TODAY())
VAR ValorAnioActual = CALCULATE([Total Importe Encargo], FILTER('MasterCalendar', 'MasterCalendar'[Year] = AnioActual))
VAR ValorAnioAnterior = CALCULATE([Total Importe Encargo], FILTER('MasterCalendar', 'MasterCalendar'[Year] = AnioActual - 1))
VAR Diferencia = ValorAnioActual - ValorAnioAnterior
VAR PorcentajeCambio = DIVIDE(Diferencia, ValorAnioAnterior, 0)
RETURN
SWITCH(
TRUE(),
Anioseleccionado < 5, [Total Importe Encargo], -- Para los valores menores a 5, muestra el Total Importe Encargo
Anioseleccionado = 5, Diferencia, -- Cuando el valor de Orden es 5, muestra la diferencia
Anioseleccionado = 6, FORMAT(PorcentajeCambio, "0.00%") -- Cuando el valor de Orden es 6, muestra el porcentaje
)
But sadly, this does not work as I expected.
Could anyone give me a hand with this ?
Thanks