The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Is this possible? I need the top10% of a value not a set whole number. I tried to create a measure and use that in the TopN dax formula but am receiving an error
I also tried this formula
You didn't provide what [10% Distinct Owners] is, but I assume you have a slicer to show TOP number to show and a table with Opportunity Owners. If so, try the following...
Net Sales Ranked:=
IF (
ISINSCOPE ( 'RevRec'[Opportunity_Owner_Name] ),
VAR OwnersToRank = [TopN] -- Can Use Selected Value or hardcode, e.g 10
VAR SalesAmount = [Sales Amount] -- OR SUM('RevRec'[Net Revenue])
RETURN
IF (
SalesAmount > 0,
VAR VisibleOwner =
CALCULATETABLE (
VALUES ( 'RevRec' ),
ALLSELECTED ( 'RevRec'[Oportunity_Owner_Name] )
)
VAR Ranking =
RANKX (
VisibleOwner,
[Sales Amount],
SalesAmount
)
RETURN
IF (
Ranking > 0 && Ranking <= OwnersToRank ,
Ranking
)
)
)
User | Count |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |