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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Pikachu-Power
Impactful Individual
Impactful Individual

dynamic column name in complex matrix

hi all,

 

i have a complex matrix in a following form:

 

Unbenannt.PNG

 

The measures are dynamic in dependence of a quarter filter and are like:

 

Measure1 =
VAR _SelectedMeasure = SELECTEDVALUE ( Table[Quarter] )
RETURN
SWITCH(
_SelectedMeasure,
"Q1",[Plan],
"Q2",[FCI],
"Q3",[FCII],
"Q4",[FCIII]
)
 
All measures are different. For example measures for previous year or cumulative values. 
 
So it is possible to give the measures a dynamic name? For measure1 for example i want Plan 2021, FC I 2021, FC II 2021, FC III 2021 in dependence of the filters Year and Quarter.  
 
Thanks!
 
5 REPLIES 5
Icey
Community Support
Community Support

Hi @Pikachu-Power ,

 

It is not supported to create dynamic meausre name.

You can try to create a new table with all measure names needed via "Enter Data". For example:

 

Sort MeasureName

1

Plan 2021
2 FC I 2021
3 FC II 2021
4 FC III 2021
5 Plan 2020
6 FC I 2020
7 FC II 2020
8 FC III 2020
... ...

 

Then, create a measure to replace "Measure1" in your table visual like so:

Measure 1 - 1 =
VAR SelectedYear =
    SELECTEDVALUE ( 'Table'[Year] )
VAR SelectedQuarter =
    SELECTEDVALUE ( 'Table'[Quarter] )
VAR SelectedMeasureName =
    SELECTEDVALUE ( 'MeasureNameTable'[MeasureName] )
RETURN
    SWITCH (
        SelectedYear,
        2021,
            IF (
                ( SelectedQuarter = "Q1" && SelectedMeasureName = "Plan 2021" )
                    || ( SelectedQuarter = "Q2" && SelectedMeasureName = "FCI 2021" )
                    || ( SelectedQuarter = "Q3" && SelectedMeasureName = "FCII 2021" )
                    || ( SelectedQuarter = "Q4" && SelectedMeasureName = "FCIII 2021" ),
                [Measure1]
            ),
        2020,
            IF (
                ( SelectedQuarter = "Q1" && SelectedMeasureName = "Plan 2020" )
                    || ( SelectedQuarter = "Q2" && SelectedMeasureName = "FCI 2020" )
                    || ( SelectedQuarter = "Q3" && SelectedMeasureName = "FCII 2020" )
                    || ( SelectedQuarter = "Q4" && SelectedMeasureName = "FCIII 2020" ),
                [Measure1]
            )
    )

 

 

 

Best Regards,

Icey

 

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

Pikachu-Power
Impactful Individual
Impactful Individual

Ok thanks for feedback. What would be the best workaround?

@Pikachu-Power , Think display name in title , as shown in this blog - https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@Pikachu-Power 

 

Currently, according to my knowledge, you can't dynamically change the names of columns in a the standard matrix visual.

amitchandak
Super User
Super User

@Pikachu-Power , You can change the title based similar kind of formula. But I doubt you can change the measure name.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.