Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I would like to understand if it is possible to create a matrix that displays data as follows:
I've tried having the source table structured like this:
and then putting it in a matrix, including the "planned" values as a row, but this does not seem to allow to have a column total (300 in the example) which would be required.
The other option I have tried was to unpivot the table on the weeknumber column:This generates the actuals in a weeknumber column, but each week needs to be added manually then into the matrix. The automated refresh would unpivot and generate new week columns when it detect new data as the year progresses, but it is not pragmatic to add the weeks manually on regular basis.
Would there be a proper solution to come to the targetted view?
Many thanks in advance!
Solved! Go to Solution.
Hi @Anonymous ,
I believe that you need to redo the way you have your data in order to have the expected result and also use a small trick on the matrix:
I created the following tables:
Actuals:
ID | WEEK | Month | Actuals |
AB | 1 | 2 | 20 |
AB | 2 | 2 | 20 |
AB | 3 | 2 | 20 |
AB | 4 | 2 | 20 |
Planned:
Planned | ID | Month |
100 | AB | 2 |
Months:
Month |
2 |
3 |
Category:
ID | Cat | Type |
AB | A | B |
Then created the following relationships:
Category[ID] -> Actuals[ID] - One to Many: Single filter
Category[ID] -> Planned[ID] - One to Many: Single filter
Months[Month] -> Actuals[Month] - One to Many: Single filter
Months[Month -> Planned[Month] - One to Many: Single filter
Then add the following measure:
Planned - Actuals = SUM(Actuals[Actuals])-SUM(Planned[Planned])
Then make your matrix like this:
Rows:
Columns:
Values:
Now comes the trick parts on the matrix:
Should give the result below.
Check PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
I believe that you need to redo the way you have your data in order to have the expected result and also use a small trick on the matrix:
I created the following tables:
Actuals:
ID | WEEK | Month | Actuals |
AB | 1 | 2 | 20 |
AB | 2 | 2 | 20 |
AB | 3 | 2 | 20 |
AB | 4 | 2 | 20 |
Planned:
Planned | ID | Month |
100 | AB | 2 |
Months:
Month |
2 |
3 |
Category:
ID | Cat | Type |
AB | A | B |
Then created the following relationships:
Category[ID] -> Actuals[ID] - One to Many: Single filter
Category[ID] -> Planned[ID] - One to Many: Single filter
Months[Month] -> Actuals[Month] - One to Many: Single filter
Months[Month -> Planned[Month] - One to Many: Single filter
Then add the following measure:
Planned - Actuals = SUM(Actuals[Actuals])-SUM(Planned[Planned])
Then make your matrix like this:
Rows:
Columns:
Values:
Now comes the trick parts on the matrix:
Should give the result below.
Check PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@Anonymous can you share the data in excel to get you the solution? You can share thru one drive/google drive.
Although seems like what you after is possible. Cheers!!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
92 | |
89 | |
35 | |
35 |
User | Count |
---|---|
153 | |
99 | |
82 | |
63 | |
54 |