Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello guys,
I want to show the hierarchical data in matrix visual,like manager name under that sales persons of that manager and I also want to see manager's data how to show that..below is my sample data
Manager name sales person
A B
B c
A F
C G
A H
F A
I want matrix like
Manager name
A
A
B
F
H
Please help
Solved! Go to Solution.
Hi @pra137 ,
According to your description, here’s my sample data.
Method1
In this case, Manager cannot join his own scope according to the data structure.
You can add a measure to calculate the value of manager separately.
Measure =
VAR _MANAGE =
CALCULATETABLE ( VALUES ( 'Table (2)'[Manager name] ), ALL ( 'Table (2)' ) )
RETURN
IF (
MAX ( 'Table (2)'[Sales person] ) IN _MANAGE,
SUM ( 'Table (2)'[Sales] ),
BLANK ()
)
Method2
Change the data source or create a new table in order to achieve the desired result.
Copy 1to 2 and 3, copy 4 to 5.
Put Manager name and Sales person to rows and put Sales to values, then get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @pra137 ,
According to your description, here’s my sample data.
Method1
In this case, Manager cannot join his own scope according to the data structure.
You can add a measure to calculate the value of manager separately.
Measure =
VAR _MANAGE =
CALCULATETABLE ( VALUES ( 'Table (2)'[Manager name] ), ALL ( 'Table (2)' ) )
RETURN
IF (
MAX ( 'Table (2)'[Sales person] ) IN _MANAGE,
SUM ( 'Table (2)'[Sales] ),
BLANK ()
)
Method2
Change the data source or create a new table in order to achieve the desired result.
Copy 1to 2 and 3, copy 4 to 5.
Put Manager name and Sales person to rows and put Sales to values, then get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @v-yanjiang-msft
Whenever we apply RLS on Method 2 solution, I mean when Manager A will log in to report. He is seeing manager A data and also Manager F data with sales person A..which is not correct I only want to show Manager A data..Is it possible..?
Hi @pra137 ,
F is shown under the manager A is because F is a sales person of manager A in your sample.
Best Regards,
Community Support Team _ kalyj
Hello @v-yanjiang-msft
How to copy data as u shown in method 2 with live data..?
Hi @pra137 ,
Believe that for this you need to use the Parent Child hiererchy check the link below:
https://www.daxpatterns.com/parent-child-hierarchies/
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |