Forum Discussion
Anonymous
3 years agoNot applicable
Top N basis the filter value
I have a dataset which contains the Name and Joining Date and Salary of some employees. (Hypothetical Scenario, real scenario is different) I have put the Name in the filter. Now I have colum...
- 3 years ago
Hi,
I tried to create a sample pbix file like below.
please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Salary expected top10 measure: = VAR _slicerselect = MAX ( 'Employee slicer'[Employee] ) VAR _slicerselectjoindate = CALCULATE ( MAX ( Employee[Join date] ), Employee[Employee] = _slicerselect ) VAR _top10table = TOPN ( 10, FILTER ( ALL ( Employee ), Employee[Join date] <= _slicerselectjoindate ), Employee[Join date], DESC ) RETURN CALCULATE ( SUM ( Employee[Salary] ), KEEPFILTERS ( _top10table ) )
Anonymous
3 years agoNot applicable
Thank you very much Jihwan_Kim for your help and support.