Forum Discussion
shareezsaleem
1 year agoHelper III
Show Only Top N In Column Level
Hi All, I have a matrix like below: Level 1 WBS1 WBS2 WB3.....WBS723 MACHS 12 34 44 PAX 28 44 22 ELEC. 60 32 11 Total 100 110 ...
- 1 year ago
AmiraBedh
1 year agoSuper User
You may not be able to achieve what you want in PBI, but here is something that is a workaround.
You need to unpivot your columns :
-
Go to Transform Data
-
Select your table
-
Select all
WBS1toWBS723columns -
Right-click > Unpivot Columns
-
Rename:
-
Attribute→WBS -
Valueremains as is
-
From :
To :
Then create 2 measures :
Total Value by WBS =
CALCULATE(
SUM('RawData'[Value]),
ALLEXCEPT('RawData', 'RawData'[WBS])
)
WBS Rank =
RANKX(
ALL('RawData'[WBS]),
[Total Value by WBS],
,
DESC,
Dense
)
Show Top WBS =
IF([WBS Rank] <= 50, 1, 0)
The last measure you will use it as a filter on the visual.
shareezsaleem
1 year agoHelper III
Please reply ..