Forum Discussion
kjshah5030
8 years agoFrequent Visitor
Dax Top 1 Name
Hello Everyone, I am a new to Power BI, I need a help for Dax , I have matrix table , table image is given below so , I want to top 1 GICS Level name using High Banchmark End Weight , wan...
- 8 years ago
Try with
= CALCULATE ( MAX ( [GICS Level] ), FILTER ( VALUES ( ContributionCategory[SECTOR] ), RANKX ( ALL ( ContributionCategory[SECTOR] ), [EndWeightBanchmark],, DESC ) = 1 ) )
Zubair_Muhammad
8 years agoCommunity Champion
Try with
=
CALCULATE (
MAX ( [GICS Level] ),
FILTER (
VALUES ( ContributionCategory[SECTOR] ),
RANKX ( ALL ( ContributionCategory[SECTOR] ), [EndWeightBanchmark],, DESC ) = 1
)
)kjshah5030
8 years agoFrequent Visitor
Hi
Zubair_Muhammad, one more think for above example ,
How can I ignore blank value and whatever result got on second or third those rank start as first ,
For instance, we do have 10 values , out of it first three value is blank, and I want 4th value connsider as a first rank. How can I get it? Please do let me know ASAP.
- Zubair_Muhammad8 years agoCommunity Champion
I think you will need to modify the table parameter of RANKX
But not sure
RANKX(CALCULATETABLE(VALUES(ContributionCategory[SECTOR]),[VALUES]<>BLANK())
- kjshah50308 years agoFrequent Visitor
Hi,
Zubair_MuhammadThanks for kind reply,
I tried with
here my fields and table are different but scenario is same , I m not getting value on first
rank , getting blank value on first rank
any other solution ?- Zubair_Muhammad8 years agoCommunity Champion