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.
Table X is a simple table with product_id, product_title, and a ranking for the date determined by a slicer. The user selects a date, and the table shows the ranks for each item.
Now we'd like to add a chart next to the table, showing the ranking position over time, for the selected item in the table. However, because Table X is filtered on a date, the chart only reflects the ranking for that date.
I've tried a handful of measures around VALUES, SELECTEDVALUE, ALL, ALLEXCEPT, but can't get it to function they way we'd like.
Backend Data would look something like
@dmount33 it will be easier if you throw a sample data and the existing measure used for ranking, and also how tables are connected, it will help to provide the solution.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
In this case rank isn't calc'd, it's just the rank of a product on a listing page which comes out of a script, effectively a str. And just the one table, nothing connected (yet)
Hi @dmount33 ,
Maybe you can try the following code in your case. I use other functions regardless rankx().
Measure =
VAR _a =
SUMMARIZE(
FILTER(ALL('Table'),[d_data]=SELECTEDVALUE('Table'[d_data])),
[product_title],
"minrank", MIN( 'Table'[p_rank] )
)
VAR _r =
ADDCOLUMNS( _a, "newrank", RANKX( _a, [minrank],, ASC ) )
RETURN
MINX(
FILTER( _r, [product_title] = MAX( 'Table'[product_title] ) ),
[newrank]
)
result:
Pbix file in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
96 | |
95 | |
80 | |
74 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |