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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jawilson808
Helper I
Helper I

Matrix Help

Hi there!

 

Hoping you can help me find a solution to a couple of issues I am having with a matrix visual.
What I am trying to accomplish:

1. Give my matrix custom headers

2. By default, current year and variance should always show

3. Allow user to select a diffent period to compare ( Last Year Column below)

4. Calculate the variance between current year and the selected value(Last year column below)

As an example:

Period     Current Year                Last Year (should change)                 Variance

Date        QTY   Revenue            QTY   Revenue                                      QTY Revenue

Jan           1       105                    2       110                                               -1    -5

Mar          2       107                    2       107                                                0     0

....  

To accomplish step 1, I created a blank table with all of my time periods including current year and variance.

Table looks as such:

Period

Current Year

Last Year
Forecast
2 Years Ago
Variance

 

My measures were calculated by a variable dax that looks as such:

QTY=

Var CurrentYear=sum(currentrev)
Var LastYear=Sum(lastyearrev)

Var 2Yearsago=sum(twoyearsrev)

Return
if(selectedvalue(column)="Current Year",CurrentYear,if(selectedvalue....

I have successfully created the table, but not able to accomplish 2-4. 

 

Any help would be greatly appreciated

1 ACCEPTED SOLUTION

Hi, @jawilson808 

Thank you for sharing your sample data.

I have tried, but could not come up with a nicer solution than what I have done in the link below.

The visualization is not a matrix, but it is a table visualization.

Please check.

 

https://www.dropbox.com/s/2rr7efzh464j729/Sample%20pbix.pbix?dl=0 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, @jawilson808 

If it is OK with you, please share your sample data file, then I can try to come up with more accurate measures to solve your problem.

In this case, I can try to use a time intelligent function like, DATEADD.

 

Thank you.

Jihwan Kim

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


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi @Jihwan_Kim ,
Thank you for getting back to me. You can access the sample data here https://drive.google.com/file/d/1d5Qnk1UccKTypGw6wvWXSMxqMghceQv2/view?usp=sharing

Thank you.

Hi, @jawilson808 

Thank you for sharing your sample data.

I have tried, but could not come up with a nicer solution than what I have done in the link below.

The visualization is not a matrix, but it is a table visualization.

Please check.

 

https://www.dropbox.com/s/2rr7efzh464j729/Sample%20pbix.pbix?dl=0 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you @Jihwan_Kim for your assistance. I actually used this setup in a previous report but its not as clean when you have muliple measures that you are attempting to "group" and use the same naming convention. I think the best way I can train my users would to use some type of color coding and the groupings as you demonstrated. I greatly appreciate you looking into this. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors