Forum Discussion
Gopinath_iyer
Helper II
5 years agofilter out upper level data
Dear Friends, I am new to power bi and struct with a case. Hope to get some inputs here. i will try to explain...let say we have employees data of an organization. i have created simple tabl...
- 5 years ago
Hi Gopinath_iyer ,
Create a slicer table as below:
Table 2 = VALUES('Table'[employee name ])Then create 2 measures as below:
_employee name = SWITCH(SELECTEDVALUE('Table 2'[employee name ]), "A",CALCULATE(MAX('Table'[employee name ]),'Table'[employee name ] in FILTERS('Table'[employee name ])), "B",CALCULATE(MAX('Table'[employee name ]),'Table'[employee name ] in FILTERS('Table'[employee name ])&&'Table'[employee name ]<>"A"), "C",CALCULATE(MAX('Table'[employee name ]),FILTER(ALL('Table'),'Table'[employee name ]="C")))_age = var age=CALCULATETABLE(VALUES('Table'[age]),FILTER(ALL('Table'),'Table'[employee name ]=[_employee name])) Return IF(MAX('Table'[age]) in age,MAX('Table'[age]),BLANK())And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Gopinath_iyer
Helper II
5 years agoHi
Sorry for replying so late.
Thanks for the solution...but the real data has many names, in this solution emp names are hard coded.
Can we make it dynamic?
regards,
Gopi