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
psembaj
Frequent Visitor

Name of Headers in a Table

Hello! I have a table that has 5 columns.

Column 1 is the name of the product.

Column 2 Total annual sales of a product for the current year (2018)

Column 3 Total annual sales of a product for the year before the current one

Column 4 Total annual sales of a product for 2 years prior to the current one

Column 5 Total annual sales of a product for 3 years prior to current

 

I need the name of the column to be equal to the calculated year. But it can not be a fixed value, since next year (2019), the names should be: Column 2: 2019 Column 3: 2018 Column 4: 2017 Column 5: 2016   And so on as the years change. I achieved this behavior by adapting a visual object "card", but I lose the functionality of the ordering table from highest to lowest, since it is covered by the visual object. I imagine that there is some way to achieve this in another way. Can you tell me how? Thank you

 ScreenShot028.jpg

 

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi psembaj,

 

Have you solved your issue? Could you kindly mark one answer to finish this case?


Regards,

Jimmy Tao

v-yuta-msft
Community Support
Community Support

Hi psembaj,

 

Could you share some sample data and clarify more details about your expected table format?

 

Regards,

Jimmy Tao

The shape of your data is not optimal for power BI. You should unpivot the columns so you have a column called year and another column called value. You can do this in power query. You will then need to apply some logic in your query to set the correct values for each year. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.

Top Solution Authors