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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Dynamic Matrix Table with dynamic column headers

Hello :),

 

I have 2 questions for my Matrix table. I need to do a matrix table which includes the Actual values until the current Date and for the rest of the Year the Forecast Values. For Example: Today is the 20.06.2021, so until June I want to show the actuals and for  the rest of the Year the forecast (BP2021).  I wanted to know what the best approach is. My thirst thoght was to da an if-statement combined with Date().  But I am not sure, if that is the best approach.

 

My other Question is, is it possible to show in the column header, if it is an Actual or an Forecast? Otherwise the User will not know, which values are actaul or forecast.

 

I am very thankful, for every help and tip.

 

Here is how my Datatable looks like:

PeriodMonthValue
Actual 202131.0110
Actual 202128.02

20

Actual 202131.0330
Actual 202130.04

40

Actual 202131.0520
BP 202130.06300
BP 202130.07100
BP 202128.02200
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You could use Conditional Formatting. Use 1 and 0 instead of Actual and Forecast. Then use the measure as rule.
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting 

 

Best Regards,

Jay

View solution in original post

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

Screenshot 2021-06-20 122714.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Hi @CNENFRNL ,

 

thank you for quick help. I would like to do matrix table where each month is a separte column. I think I can adopt the code for the measure.

The final Matrix table should look like this:

 

Cost type

Jan

FebMarMayJuneJulyAugSeptOct
US100xxxxxxxxxxxxxxxxxxxxx

xxx

xxx

 

So now I would add calculated columns for each month and post your code.

 

Now the question is, how can I highlight in the column header, which month is an actual or a forecast?

 

Thank you and best regards,

 

Albert

 

Anonymous
Not applicable

Hi @Anonymous ,

 

You could use Conditional Formatting. Use 1 and 0 instead of Actual and Forecast. Then use the measure as rule.
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting 

 

Best Regards,

Jay

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors