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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
wpretz
Frequent Visitor

Se pueden agrupar medidas calculadas en categorias?

Buenas tardes comunidad!

Quisiera saber si es posible realizar este tipo de grafico:

wpretz_0-1712875294776.png

Tengo todos los valores en medidas calculadas (son 12 medidas) pero necesito agruparlas de esta forma. Se puede? o debo generar 3 graficos distintos?

 

MENSUAL:

[VAR_COMP_ICWH_MES/MES_ANT]
[VAR_indice_CEDOL_MES/MES_ANT]
[VAR_indice_IPC_MES/MES_ANT]
[VAR_indice_TC_OFICIAL_MES/MES_ANT]
 
ACUMULADO:
[VAR_COMP_ICWH_MES/DIC_AÑO_ANT]
[VAR_indice_CEDOL_MES/DIC_AÑO_ANT]
[VAR_indice_IPC_MES/DIC_AÑO_ANT]
[VAR_indice_TC_OFICIAL_MES/DIC_AÑO_ANT]
 
INTERANUAL
[VAR_COMP_ICWH_MES/MES_AÑO_ANT]
[VAR_indice_CEDOL_MES/MES_AÑO_ANT]
[VAR_indice_IPC_MES/MES_AÑO_ANT]
[VAR_indice_TC_OFICIAL_MES/MES_AÑO_ANT]

 

Gracias!

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @wpretz ,

 

You can use Enter data to create a left join of two tables and then use the Switch() function to customize it.

Here are the steps you can follow:

1. Use Enter data.

vyangliumsft_0-1712901568118.png

vyangliumsft_1-1712901568119.png

2. Create calculated table.

 

All =
CROSSJOIN('Group_Table1','Group_Table2')

 

vyangliumsft_2-1712901589911.png

3. Create measure.

 

Test =
SWITCH(
    TRUE(),
    MAX('All'[X_Group1])="VAR IACION MENSUAL"&&MAX('All'[X_Group2])="ICWH",[Measure1],
    MAX('All'[X_Group1])="VAR IACION MENSUAL"&&MAX('All'[X_Group2])="CEDOL S/transp",[Measure2],
    MAX('All'[X_Group1])="ACUMULADO 2024"&&MAX('All'[X_Group2])="ICWH",[Measure3],
    MAX('All'[X_Group1])="ACUMULADO 2024"&&MAX('All'[X_Group2])="CEDOL S/transp",[Measure4],
    MAX('All'[X_Group1])="INTERANUAL"&&MAX('All'[X_Group2])="ICWH",[Measure5],
    MAX('All'[X_Group1])="INTERANUAL"&&MAX('All'[X_Group2])="CEDOL S/transp",[Measure6])

 

4. Result:

vyangliumsft_3-1712901589916.png

Best Regards,

Liu Yang

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

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @wpretz ,

 

You can use Enter data to create a left join of two tables and then use the Switch() function to customize it.

Here are the steps you can follow:

1. Use Enter data.

vyangliumsft_0-1712901568118.png

vyangliumsft_1-1712901568119.png

2. Create calculated table.

 

All =
CROSSJOIN('Group_Table1','Group_Table2')

 

vyangliumsft_2-1712901589911.png

3. Create measure.

 

Test =
SWITCH(
    TRUE(),
    MAX('All'[X_Group1])="VAR IACION MENSUAL"&&MAX('All'[X_Group2])="ICWH",[Measure1],
    MAX('All'[X_Group1])="VAR IACION MENSUAL"&&MAX('All'[X_Group2])="CEDOL S/transp",[Measure2],
    MAX('All'[X_Group1])="ACUMULADO 2024"&&MAX('All'[X_Group2])="ICWH",[Measure3],
    MAX('All'[X_Group1])="ACUMULADO 2024"&&MAX('All'[X_Group2])="CEDOL S/transp",[Measure4],
    MAX('All'[X_Group1])="INTERANUAL"&&MAX('All'[X_Group2])="ICWH",[Measure5],
    MAX('All'[X_Group1])="INTERANUAL"&&MAX('All'[X_Group2])="CEDOL S/transp",[Measure6])

 

4. Result:

vyangliumsft_3-1712901589916.png

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Genio! Gracias!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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