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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LD1
Helper III
Helper III

Create data group to simplify visual

Hi everyone, 

 

I would like to organize some formulas in a matrice because it's difficult to analyse this one with many field. 

Is it possible to regroup like a "bloc" different formulas ? 

Here this is my example : 

 

LD1_2-1759402328210.png

 

Thank you in advance, 

 

 

 

1 ACCEPTED SOLUTION
v-sshirivolu
Community Support
Community Support

Hi @LD1 ,
Thanks for reaching out to Microsoft Fabric Community Forum.
Organize Your Formulas/Blocks Efficiently with Field Parameters

I have tried this repro on my side and got results. Please check it, and if you encounter any issues, let me know.
Created a simple table
Year Sales Budget
2024 100 120
2025 150 130

Created Measures Individually

S_2025 = CALCULATE(SUM(Data[Sales]), Data[Year] = 2025)
Var_S_vs_S_1_2025 = [S_2025] - SUM(Data[Budget])
Var_S_vs_S_2_2025 = DIVIDE([S_2025] - SUM(Data[Budget]), SUM(Data[Budget]))

These measures serve as the formulas to be grouped.

Created Field Parameters

Navigate to Modeling - New Parameter - Fields.

In the dialog box, select the measures to group:

S_2025

Var_S_vs_S_1_2025

Var_S_vs_S_2_2025

Rename the parameter to Measure Groups and Create. Power BI will generate:

A slicer visual featuring your parameter , new DAX table named Measure Groups.

Added Matrix visual.

Add Year to Rows.

Include the Measure Groups field parameter in Values.

This setup allows dynamic grouping and switching between blocks. Maintenance is straightforward, simply update the field parameter when new measures are introduced.

View solution in original post

4 REPLIES 4
v-sshirivolu
Community Support
Community Support

Hi @LD1 ,
Thanks for reaching out to Microsoft Fabric Community Forum.
Organize Your Formulas/Blocks Efficiently with Field Parameters

I have tried this repro on my side and got results. Please check it, and if you encounter any issues, let me know.
Created a simple table
Year Sales Budget
2024 100 120
2025 150 130

Created Measures Individually

S_2025 = CALCULATE(SUM(Data[Sales]), Data[Year] = 2025)
Var_S_vs_S_1_2025 = [S_2025] - SUM(Data[Budget])
Var_S_vs_S_2_2025 = DIVIDE([S_2025] - SUM(Data[Budget]), SUM(Data[Budget]))

These measures serve as the formulas to be grouped.

Created Field Parameters

Navigate to Modeling - New Parameter - Fields.

In the dialog box, select the measures to group:

S_2025

Var_S_vs_S_1_2025

Var_S_vs_S_2_2025

Rename the parameter to Measure Groups and Create. Power BI will generate:

A slicer visual featuring your parameter , new DAX table named Measure Groups.

Added Matrix visual.

Add Year to Rows.

Include the Measure Groups field parameter in Values.

This setup allows dynamic grouping and switching between blocks. Maintenance is straightforward, simply update the field parameter when new measures are introduced.

Hi @LD1 ,

I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

 

Hi @LD1 ,

I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you

 

AmiraBedh
Super User
Super User

Hello !

Thank you for posting on Microsoft Fabric community.

You need 2 disconnected tables :

Blocks =
DATATABLE(
"Block", STRING, "Order", INTEGER,
{
{"2025", 1},
{"2024 à date", 2},
{"2023 à date", 3},
{"Situation 2025 vs 2024", 4},
{"Situation 2025 vs 2023", 5},
{"Écart vs 2024 final", 6},
{"Écart vs 2023 final", 7}
}
)

Items =
DATATABLE(
"Block", STRING, "Item", STRING, "Order", INTEGER,
{
{"2025","S",1}, {"2025","Var S / S-1",2},

{"2024 à date","S",1}, {"2024 à date","Var S / S-1",2},

{"2023 à date","S",1}, {"2023 à date","Var S / S-1",2},

{"Situation 2025 vs 2024","S",1}, {"Situation 2025 vs 2024","% SWLY",2}, {"Situation 2025 vs 2024","% SWLY S-1",3},

{"Situation 2025 vs 2023","S",1}, {"Situation 2025 vs 2023","% SWLY",2}, {"Situation 2025 vs 2023","% SWLY S-1",3},

{"Écart vs 2024 final","2024 final",1},{"Écart vs 2024 final","% d'atteinte S",2},

{"Écart vs 2023 final","2023 final",1},{"Écart vs 2023 final","% d'atteinte S",2}
}
)

 

Then you need a measure to map each block and item to it :

Display =
VAR blk = SELECTEDVALUE(Blocks[Block])
VAR it  = SELECTEDVALUE(Items[Item])
RETURN
SWITCH ( TRUE(),
    blk="2025" && it="S",                        [S_2025],
    blk="2025" && it="Var S / S-1",              [Var_S_vs_S_1_2025],

    blk="2024 à date" && it="S",                 [S_YTD_2024],
    blk="2024 à date" && it="Var S / S-1",       [Var_S_vs_S_1_YTD_2024],

    blk="2023 à date" && it="S",                 [S_YTD_2023],
    blk="2023 à date" && it="Var S / S-1",       [Var_S_vs_S_1_YTD_2023],

    blk="Situation 2025 vs 2024" && it="S",          [Delta_2025_vs_2024],
    blk="Situation 2025 vs 2024" && it="% SWLY",     [%SWLY_2025_vs_2024],
    blk="Situation 2025 vs 2024" && it="% SWLY S-1", [%SWLY_S_1_2025_vs_2024],

    blk="Situation 2025 vs 2023" && it="S",          [Delta_2025_vs_2023],
    blk="Situation 2025 vs 2023" && it="% SWLY",     [%SWLY_2025_vs_2023],
    blk="Situation 2025 vs 2023" && it="% SWLY S-1", [%SWLY_S_1_2025_vs_2023],

    blk="Écart vs 2024 final" && it="2024 final",    [Final_2024],
    blk="Écart vs 2024 final" && it="% d'atteinte S",[Pct_Attainment_vs_2024],

    blk="Écart vs 2023 final" && it="2023 final",    [Final_2023],
    blk="Écart vs 2023 final" && it="% d'atteinte S",[Pct_Attainment_vs_2023],

    BLANK()
)

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors