Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello Everyone,
I have following dataset:
Based on that i want to have 3 charts:
1. Chart #1 is to show items order by sold quantity (pieces)
2. Chart #2 and #3 are to show sales of top 1 sold item by shop (#2 chart) and top 2 sold item by shop (#3)
Chart #1 looks like this:
Chart #2 should look like this:
I have written following measure:
Rank of Sold Items =
CALCULATE(
MAX(Sheet2[Item]),
FILTER(
VALUES(Sheet2[Item]),
RANKX(
ALL(Sheet2[Item]),
SUM(Sheet2[Sold pieces])
) = 1
)
)
but this returns Item #4 that is not ranked as #1. I assume that i should use different function then MAX to return name of top 1 ranked item.
Could you please help change measure so it returns #1 ranked item?
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please try the below whether it suits your requirement.
Rank of Sold Items =
CALCULATE (
MAX ( Sheet2[Item] ),
FILTER (
VALUES ( Sheet2[Item] ),
RANKX ( ALL ( Sheet2[Item] ), CALCULATE ( SUM ( Sheet2[Sold pieces] ) ) ) = 1
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure if I understood your question correctly, but please try the below whether it suits your requirement.
Rank of Sold Items =
CALCULATE (
MAX ( Sheet2[Item] ),
FILTER (
VALUES ( Sheet2[Item] ),
RANKX ( ALL ( Sheet2[Item] ), CALCULATE ( SUM ( Sheet2[Sold pieces] ) ) ) = 1
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank You!
It seems that you did understood because it works.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
26 | |
24 | |
12 | |
11 | |
10 |