Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Find articles, guides, information and community news

Most Recent
johnbasha33
Super User
Super User

Problem Statement

In many financial dashboards and models, daily interest rates — especially Treasury Bill (T-Bill) rates — are critical data points.
Traditionally, this information is either:

  • Manually downloaded,

  • Updated periodically via spreadsheets, or

  • Hardcoded into static tables.

👉 However, manually maintaining this data introduces:

  • Risk of errors,

  • Time overhead,

  • Lack of real-time updates.

In a dynamic world, an automated solution is needed to fetch daily updated Treasury Bill rates directly inside Power BI — without needing to maintain tables manually.

Read more...

Sahir_Maharaj
Super User
Super User

Creating a Power BI report is only half the story. How you tell the story behind your data (your design choices, your analytical thinking, and how users interact with your report)  matters just as much.

Read more...

ajaybabuinturi
Resolver I
Resolver I

Everyone knows how to get Top N metrics using Top N Filter type in the Filters section/pane or by using TOPN DAX function. However, some businesses require a more dynamic and interactive Top N selection to meet their analytical needs. In this blog, I will walk you through the steps to achieve a dynamic/interactive Top N selection in Power BI.

Step1: Create a Numeric Parameter for Top N Selection

After importing sample data into Power BI, we need to create a numeric parameter for Top N selection.

  • Navigate to the Modelling (1) tab → Click on Parameters (2) drop down → Select Numeric range (3).
    Picture1.png
  • Rename the parameter (4) and set the minimum, maximum and increment (5) values based on business needs. (Here I used Name: Top_Parameter, Min: 0, Max: 20 and Increment: 5 for presentation purpose). Then hit the Create button.
  • The increment value ensures that to create a parameter range from minimum to maximum values.
    Picture2.png
  • The TOP_Parameter output will look like a numeric range for slicer selection as below.
    Picture3.png


    Step 2: Replace Hardcoded TOPN Number with Dynamic Parameter

  • Once the parameter is created, replace the hardcoded TOPN number (6) in the TOP 5 measure with the newly created TOP_Parameter. You can achieve this using one of two methods either 1 or 2.
    Picture4.png
  • Updated measure as below
    Picture6.png
  • After the above point, create a visual using the modified TOPN measure. The results will dynamically change based on the selected Top N value.   
    Picture7.png

    ***Addressing Business Needs with an Adaptive Model Count***

  • So far, we have made the Top N selection dynamic, but have we truly addressed all business needs?

    NO, because we don’t yet know how many ‘Models/Categories’ exist in the dataset. To account for this:

  • Modify the TOP_Parameter to dynamically count all Models/Categories. For that you need to change the measure as below to find out the maximum number of the Models/Categories. The list will extend to the maximum value, ensuring that any newly added ‘Model’ in the future is automatically included. 
    Picture8.png
  • Create a new measure (IsTop) in the TOP_Parameter table to find whether the selected Model/Category exist in the TOPN list. Which will help us to get the selected TOPN Models for visualization.
    Picture9.png
  • After completion of IsTop measure, add it to the visual Filters Section/Pane and set the filter to show the items where the value is 1. This will dynamically display results based on the selected Top N value.
    Picture10.png

By following this approach, we have successfully implemented an interactive and dynamic Top N selection in Power BI. This method allows businesses to analyse the top-performing categories (Ex: Sales, Models, Products) based on a user-defined Top N value. Additionally, we have addressed the challenge of tracking all available models dynamically, making the solution future-proof for evolving business requirements.

Now, with this setup, you can easily explore insights based on your selection and drive more meaningful data-driven decisions in Power BI.


Attachments: Sample BI report and data.

truptis
Community Champion
Community Champion

In this article, we will learn how to use UNICHAR icons in our report. It is beneficial to use UNICHAR icons as they are light weight text characters and not image files.  

Read more...

suparnababu8
Super User
Super User

Tailored CSV Export in Power BI – No More Unwanted Columns!

Read more...

anmolmalviya05
Super User
Super User

📌 Problem Statement

Often in Power BI reports, we want to display a dynamic value selected from a slicer — such as the year — alongside a static message for a more user-friendly view.

 

For example:

If the user selects the year 2022 from the slicer, we want to show a card that reads:

“Year is: 2022”

 

Let’s see how we can achieve that.

 

Step-by-Step Solution

🔹 Step 1: Add a Slicer

Start by adding a slicer to your report.

In this case, we are using the Year column from the 'Date Table'.

anmolmalviya05_0-1744706946787.png

 

🔹 Step 2: Create a Dynamic Measure

Now, we’ll write a DAX measure that displays the selected year along with a custom message.

 

Selected_Year_Text =

VAR Cond =

IF(

HASONEVALUE('Date Table'[Year]),

SELECTEDVALUE('Date Table'[Year]),

""

)

RETURN

"Year is: " & Cond

 

📝 Explanation:

  • HASONEVALUE ensures only one year is selected.
  • SELECTEDVALUE retrieves that selected year.
  • The result is concatenated with the static text "Year is: ".

🔹 Step 3: Display the Measure in a Card

Add a Card Visual to your report canvas and drag the Selected_Year_Text measure into it.

Whenever a user selects a year in the slicer, the card will dynamically update to reflect that choice.

 

🎯 Final Result

When the user selects 2022, the card will show:

Year is: 2022

anmolmalviya05_1-1744707017933.png

If no year is selected (or multiple are selected), the card will be blank or show a default message depending on how you enhance your DAX.

 

🧠 Conclusion

Using a combination of slicers and DAX, we can easily create dynamic card visuals that reflect user selections. This adds a personalized touch to reports and helps users keep track of applied filters at a glance.

 

💡 Want to take it a step further?

Try applying this logic to show selected regions, product categories, or even date ranges!

 

Best regards

Anmol Malviya

Sr. Data Analyst | Addend Analytics

Helpful resources

Join Blog
Interested in blogging for the community? Let us know.

OSZAR »