Forum Discussion
Unable to display values in Level2 and Level3 Matrix visual in Power Bi
- 3 years ago
Thanks a lot. it resolves all my issues.
Hi DevMaster
Hi the summarized matrix should look like this :
why on your example AA level is 50 if the total sum is 15?
thanks for your reply.
I am calculating average (5/10)*100 from backend and the data will come from SQL database. And i just want display the values only on Level2 & Level3
- Ritaf19833 years ago
Super User
Hi DevMaster again 🙂
I'm still not sure I understand.
But if you just want to show levels 2 and 3 you can achieve it with DAX
According to the hierarchy level, it shows the calculation that you "tell" himSunValue = if (ISFILTERED('Table'[Level2]),sum('Table'[Value]),if(ISFILTERED('Table'[Level1]),BLANK()))If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- DevMaster3 years agoRegular Visitor
i am trying to calculate the percentage and show the values in Level2. Could you please share .pbix file
- Ritaf19833 years ago
Super User
Hi DevMaster
If I understand you correctly and your desired result is something like this :Then you can follow these steps:
1. Add a calculated column for percentage:Percentage =VAR __Current = 'Table'[Value]VAR __Previous = MAXX(FILTER('Table','Table'[Level2] = EARLIER('Table'[Level2])),[Level2])VAR __PreviousValue = MAXX(FILTER('Table',[Level2]=__Previous),[Value])RETURNDIVIDE( __Current,__PreviousValue)2. Create a measure for the matrix:
MatrixValue = if (ISFILTERED('Table'[Level3]),SUM('Table'[Value]),if(ISFILTERED('Table'[Level2]),format(min('Table'[Percentage]),"00%"),blank()))
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly