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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
goo6kor
Frequent Visitor

Dynamic Column Header in Matrix/Table

Dear Community,

 

In my Report I am having some date based calculations which are dependent on Region also

The date based calculations are :

PY = Previous Year Sales.

CM = Current month Sales (This varies from Region to Region)

CM-1 = Current month -1 Sales (This varies from Region to Region)

CM-2 = Current month -2 Sales (This varies from Region to Region)

YTD = Year to Date(This varies from Region to Region)

 

For Example EU27+UK is one region and World is another region.
So for EU27+UK it may happen that all the calculations are done based on June 2023

and for World it may have happened for March 2023.
So dynamically in the Power BI visual can I change the name of the column?

 

Current Scenario

goo6kor_1-1691576628877.png

 

Expected Output.

goo6kor_0-1691576539056.png

 

Any hints/leads/ suggestions would be great.
I already went thorugh the some youtube videos. But these cases are not appliable for us, beacuse we have the region based dates.

https://www.youtube.com/watch?v=JVjeisHA6FU

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @goo6kor ,

 

In Power BI, you can use calculation groups and Tabular Editor to create dynamic column names based on different calculations. However, creating calculation groups natively in Power BI Desktop is not available yet, and you need to use Tabular Editor to modify the dataset


To achieve dynamic column names based on the region and date, you can create a calculation group that takes the region and date as parameters and returns the appropriate column name. Then, you can use this calculation group in your Power BI visual to display the dynamic column names.


Reference:

Creating Value Dynamic Formatting using Calculatio... - Microsoft Fabric Community

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

Dear Stephen,

 

Thank you so much for the suggestions. I will evaluate this and get back to you if this was able to solve our problem or not. 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors