Forum Discussion
admineblatest
5 years agoRegular Visitor
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 d...
- 5 years ago
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
selimovd
5 years agoMost 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 regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic