Forum Discussion
Struggle with Matrix
Hello
Is there anyway to create a matrix that looks like this?
| Product | Expected | Qtr1 | Qtr2 | Qtr3 | Qtr4 | Total |
| A | 10 | 1 | 3 | 2 | 3 | 9 |
| B | 15 | 2 | 1 | 1 | 3 | 7 |
i dont have data source i can just fill the data manually for time beeing, so i'm open for any tabel design that can produce this matrix
Any idea?
Thanks!
Hey admineblatest ,
that would be possible with a few measures and the following data structure:
The result would look like this:
Then you only need the measures for the matrix to display what they should. For example:
Expected = CALCULATE( SUM(myTable[Value]), myTable[Case] = "Expected" )And for the Quarters:
Qtr1 = CALCULATE( SUM( myTable[Value] ), myTable[Case] = "Actual", MONTH( myTable[Date] ) IN { 1, 2, 3 } )And the Total:
Total = CALCULATE( SUM(myTable[Value]), myTable[Case] = "Actual" )Please find my demo file here:
https://www.swisstransfer.com/d/54f2c59d-20b4-4e38-a5ca-3eac46a96ff8
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
1 Reply
- selimovd
Most Valuable Professional
Hey admineblatest ,
that would be possible with a few measures and the following data structure:
The result would look like this:
Then you only need the measures for the matrix to display what they should. For example:
Expected = CALCULATE( SUM(myTable[Value]), myTable[Case] = "Expected" )And for the Quarters:
Qtr1 = CALCULATE( SUM( myTable[Value] ), myTable[Case] = "Actual", MONTH( myTable[Date] ) IN { 1, 2, 3 } )And the Total:
Total = CALCULATE( SUM(myTable[Value]), myTable[Case] = "Actual" )Please find my demo file here:
https://www.swisstransfer.com/d/54f2c59d-20b4-4e38-a5ca-3eac46a96ff8
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic