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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
paolomint
Helper III
Helper III

Dynamic label of columns

Hello,

I often need to compare sales by year.

Something like that:

paolomint_0-1639402699311.png

If I don't need any other calculation, a matrix is the right choise for me, 

If the user change the year, label of the columns change automatically, perfect.

 

but often user ask for other calculation like:

 

= this year sales - last year sales

= (this year sales-last year sales)/last year sales (% of variation).

 

In this case I usually create 2 measures, sales of this year, sales of last year and I solve the problem.

but the visualization (table not matrix anymore) it will be something like that:

 

paolomint_1-1639403384768.png

this way I lost the information about the year in the label of the colums.

 

There is a way to preserve the year information in the label automatically? 

To obtain something like the example below (without change manually the labels)?

 

paolomint_2-1639403582020.png

 

here you are the .pbix of the example.

https://drive.google.com/file/d/12qxmXMCJzNuBzoMff4mdoITQCq1R-uJz/view?usp=sharing

 

I hope it is clear

Thank you very much for helping me

ciao

Paolo

 

 

 

 

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

Hi @paolomint 

You can make a small change to your Matrix, the display is a bit different, but the final result is the same .

(1)Add the measures [DIFF] and [DIFF%] in Values ,turn on the Column subtotals in Subtotals, you will get a Matrix like this :

Ailsamsft_0-1639633973679.pngAilsamsft_1-1639633973681.pngAilsamsft_2-1639633973683.png

(2)Then turn off all the word wrap in your Matrix format settings .

Ailsamsft_3-1639633973685.png

(3)Hide the columns that you don’t need .

Ailsamsft_4-1639633973686.png

The final result is as shown :

Ailsamsft_5-1639633973687.png

I have attached my pbix file , you can refer to it .

 

Best Regard

Community Support Team _ Ailsa Tao

View solution in original post

2 REPLIES 2
v-yetao1-msft
Community Support
Community Support

Hi @paolomint 

You can make a small change to your Matrix, the display is a bit different, but the final result is the same .

(1)Add the measures [DIFF] and [DIFF%] in Values ,turn on the Column subtotals in Subtotals, you will get a Matrix like this :

Ailsamsft_0-1639633973679.pngAilsamsft_1-1639633973681.pngAilsamsft_2-1639633973683.png

(2)Then turn off all the word wrap in your Matrix format settings .

Ailsamsft_3-1639633973685.png

(3)Hide the columns that you don’t need .

Ailsamsft_4-1639633973686.png

The final result is as shown :

Ailsamsft_5-1639633973687.png

I have attached my pbix file , you can refer to it .

 

Best Regard

Community Support Team _ Ailsa Tao

amitchandak
Super User
Super User

@paolomint , Changing the label of measure/ column is not possible.

 

You can try if hybrid table workaround can help

 

if you are looking for a Hybrid display with Matrix Column and measure
https://community.powerbi.com/t5/Community-Blog/Creating-a-custom-or-hybrid-matrix-in-PowerBI/ba-p/1...
https://community.powerbi.com/t5/Quick-Measures-Gallery/The-New-Hotness-Custom-Matrix-Hierarchy/m-p/...

vote for Hybrid Table
https://ideas.powerbi.com/ideas/idea/?ideaid=9bc32b23-1eb1-4e74-8b34-349887b37ebc

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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