Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
hello..
I made an equation to find top 5 and others to be displayed in Piechart by
1- create a table
Product Ranking =
UNION (
SELECTCOLUMNS (
ALLNOBLANKROW ( 'Product'[Product Name] ),
"Ranking name", 'Product'[Product Name],
"Ranking group", 'Product'[Product Name]
),
{
( "Others", "Others" )
}
)
2- create a measure
TopN Sales =
IF (
ISINSCOPE ( 'Product Ranking'[Ranking group] ), -- Show a value only if the Ranking Group is filtered
VAR NumOfProducts = 4
VAR RankingGroup =
SELECTEDVALUE ( 'Product Ranking'[Ranking group] )
VAR TopProducts =
TOPN ( NumOfProducts, ALLSELECTED ( 'Product Ranking' ), [Sales Amount] )
RETURN
if(
RankingGroup <> "Others",
CALCULATE ( [Sales Amount], KEEPFILTERS ( TopProducts ) ),
if(
RankingGroup = "Others",
IF (
NOT ISINSCOPE ( 'Product Ranking'[Ranking name] ),
VAR TopAmount =
CALCULATE ( [Sales Amount], TopProducts )
VAR AllAmount =
CALCULATE ( [Sales Amount], ALLSELECTED ( 'Product Ranking' ) )
VAR OthersAmt = AllAmount - TopAmount
RETURN
OthersAmt
))
),
[Sales Amount]
)
the next request was about when hover or drill down on others it gives him the detaild Products in others
any help!
Solved! Go to Solution.
Create a measure that uses CONCATENATEX of the product names. Use that measure as the tooltip.
Create a measure that uses CONCATENATEX of the product names. Use that measure as the tooltip.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |