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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
N7MESTE3
Regular Visitor

Power BI Data shaping - dates match figures in certain column

Hi,

 

I've been playing with this for a while and I cannot find an efficient solution.

I have a large data set with monthly dates ranging a number of years across a lot of columns, under said dates are figures against certain categories, however I need the dates to show in one column while also matching the figure against the category.

This also needs to be set up in a way that it will automatically update as changes are made as it is quite an active document. 

I have added an image of what it looks like and another to what it should look like (the one it should look like does not update automatically so it isn't of use).

I hope that makes sense, thank you!What I would prefer it to look likeWhat I would prefer it to look likeThis is the current data setThis is the current data set

1 ACCEPTED SOLUTION

Hi,
So I was able to get the answer eventually, it's a bit embarrassing but I am sharing in case anyone forgets about this simple option as I did!

I simply needed to go into Power Query and unpivot the date columns - problem solved. This is something I had done before but completely forgot. Sometimes the simple solutions are right in front of us! I appreciate all the help.

View solution in original post

7 REPLIES 7
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Thank you for replying, as I am on my work computer I cannot share a link but I have put the data into two tables. This is the raw data and I will reply agin with what I need it to look like. As I said I need it to update automatically as I have it linked to the original excel sheet with the intention of linking mine to PBI. 

Efficiency TypeEfficiency HeaderEfficiency Sub-HeaderEfficiencyCategory CodeForecast/DeliveredFORECAST - RAG STATUSRAG SCORE MATRIX (Score 1-25)01/04/202101/05/202101/06/202101/07/202101/08/202101/09/2021FORECAST 6 Monthly Apr - Sep inc 2021/22 Sub-Total
PROJECTDummy data Dummy Data 2DRDeliveredGREEN        
PROJECTDummy data Dummy Data 2NPForecastAMBERScore 11      0
PROJECTDummy data Dummy Data 2NPDeliveredGREEN        
PROJECTDummy data Dummy Data 2DRForecastAMBER       0
PROJECTDummy data Dummy Data 2DRForecastAMBERScore 07      0
PROJECTDummy data Dummy Data 2NPForecastAMBERScore 06      0
PROJECTDummy data Dummy Data 2DRDeliveredGREEN        
PROJECTDummy data Dummy Data 2DRForecastAMBERScore 13      0
PROJECTDummy data Dummy Data 2DRForecastAMBERScore 13      0
PROJECTDummy data Dummy Data 2DRDeliveredGREEN 26726.7753453.5453453.5453453.5453453.5453453.54 
BAU EfficienciesDummy data Dummy Data 2NPForecastAmberScore 24      0
BAU EfficienciesDummy data Dummy Data 2DRDeliveredGREEN        

Monthly Data[Efficiency Type]Monthly Data[Efficiency Header]Monthly Data[Efficiency Sub-Header]Monthly Data[Efficiency]Monthly Data[Category Code]Monthly Data[Forecast/Delivered]Monthly Data[FORECAST - RAG STATUS]Monthly Data[Monthly Breakdown]Monthly Data[Efficiency Value]
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/04/2024169.94
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/05/2024339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/06/2024339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/07/2024339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/08/2024339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/09/2024339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/10/2024339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/11/2024339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/12/2024339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/01/2025339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/02/2025339.88
BAU EfficienciesDummy Data Dummy Data 2DRDeliveredGREEN01/03/2025339.88
BAU EfficienciesDummy Data Dummy Data 2NPForecastAMBER01/12/2024134364.99
BAU EfficienciesDummy Data Dummy Data 2NPDeliveredGREEN01/01/20231195818.84

Hi @N7MESTE3 ,

I create a table as you mentioned.

vyilongmsft_0-1733886216995.png

Then I think you can create a measure.

RowColor = 
SWITCH (
    TRUE (),
    MAX ( 'Table'[FORECAST - RAG STATUS] ) = "AMBER", "Yellow",
    MAX ( 'Table'[FORECAST - RAG STATUS] ) = "GREEN", "Green",
    "White"
)

Currently in Power BI you can only colorize entire columns.

If you want to color all rows, you can only repeat the coloring.

vyilongmsft_1-1733886913779.png

vyilongmsft_2-1733886931142.png

vyilongmsft_3-1733886953973.png

 

 

Best Regards

Yilong Zhou

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

Hi Yilong,

Thank you for getting back to me, unfortunately that isn't the problem I'm experiencing. I can filter to show Green/Amber and colour it, the problem is linking the Efficiency to figures shown across each date column. I don't think the example table I have given really shows what I need, the figures in each date column hold multiple figures in the different efficiency rows, I need the figures to match across each date and efficiency without losing any of the data with it automatically updating. 

Unfortunately as I am unable to upload the full data I might have to figure this out on my own!

Hi @N7MESTE3 ,

I very much hope that you will be able to solve the problem you are experiencing through your own efforts.

 

If possible, after you have solved the problem, you can present your thoughts and results, which can help other users on the forum.

 

 

Best Regards

Yilong Zhou

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

Hi,
So I was able to get the answer eventually, it's a bit embarrassing but I am sharing in case anyone forgets about this simple option as I did!

I simply needed to go into Power Query and unpivot the date columns - problem solved. This is something I had done before but completely forgot. Sometimes the simple solutions are right in front of us! I appreciate all the help.

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

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