Showcase The Top Result Name Within A Card Visualization Using Power BI

No comments

A recent question came out of the Enterprise DNA Support Forum where a member needed to work out what was the top value that they had for a particular result.

Top value as card visual - Power BI

You can review the entire forum post here – Product Name as Measure for Highest Sales Product

They didn’t require just any value. They actually wanted the name of the top result, requiring text to be the result showing in a card visualisation.

I felt like this was a good example to branch out into a tutorial which shows you how to combine a few key functions inside of DAX to extract this type of result.

TOPN function review Power BI

One of the key functions to go into here is SELECTEDVALUE. What this enables you to do is extract text results inside of Power BI and showcase them in your reports in some way, shape, or form.

What we need to do is calculate a text value but we also at the same time, need to change the context in which we calculate it.

We only want to show the top result with this solution. To be able to complete any internal ranking and also change the context of a calculation we need to utilize the TOPN function.


We utilize a combination of CALCULATE, SELECTEDVALUE, and TOPN to extract this result and put it into a card visualisation inside of our Power BI report.

SELECTEDVALUE and TOPN - DAX functions Power BI

Quite a unique concept but a really useful one. Hopefully, you can see how to extract many other types of text results into cards just by changing around what filtering dynamics you have inside of the CALCULATE function.

TOPN DAX function case study

For a number of other ranking concepts for Power BI check out these relevant tutorials below.

When To Use TOPN In Power BI – DAX Formula Review

Discover Unique Insights Using TOPN in Power BI

Show Last N Sales Of A Customer Only Using Power BI

Enjoy working through this video.


***** Learning Power BI? *****
FREE COURSE – Ultimate Beginners Guide To Power BI
FREE COURSE – Ultimate Beginners Guide To DAX
FREE – 60 Page DAX Reference Guide Download
FREE – Power BI Resources
Enterprise DNA Membership
Enterprise DNA Online
Enterprise DNA Events

membership banner 3

***** Related Links*****
Deep Dive Into RANKX – DAX Formula Concepts In Power BI
Creating Dynamic Ranking Tables Using RANKX In Power BI
Show Only Top Or Bottom Results Using Ranking Formula Techniques – Power BI & DAX
Change Your Visuals Size By Ranking Logic in Power BI using DAX

***** Related Course Modules*****
Mastering DAX Calculations
Solving Analytical Scenarios w/Power & DAX
Business Analytics Series

***** Related Support Forum Posts*****
RANKX Vs TOPN what is the difference?
Dynamic top 20% customers – rank total
SWITCH & Ranking is just amazing!
For more ranking support queries to review see here…..

Enterprise DNA Events

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.