How can I dynamically filter Top N customers based on sales in the most recent fiscal quarter using a time slicer

0 votes

How can I dynamically filter Top N customers based on sales in the most recent fiscal quarter using a time slicer?
I want to filter the Top N customers based on sales in the most recent fiscal quarter using a time slicer in Power BI. I need to understand how to create a dynamic filter that updates automatically as the time slicer changes, showing only the top-performing customers for the selected quarter.

Jun 19, 2025 in Power BI by Evanjalin
• 36,180 points
477 views

1 answer to this question.

0 votes

To dynamically filter Top N customers based on sales in the most recent fiscal quarter using a time slicer:

  1. Create a Date Table with Fiscal Year and Fiscal Quarter columns.

  2. Create a Total Sales measure:

TotalSales = SUM('Sales'[Amount])

Create a measure for sales in the most recent fiscal quarter:

SalesInMostRecentQuarter = 
VAR MaxFiscalQuarter = CALCULATE(MAX('DateTable'[FiscalQuarter]), ALL('DateTable'))
VAR MaxFiscalYear = CALCULATE(MAX('DateTable'[FiscalYear]), ALL('DateTable'))
RETURN CALCULATE([TotalSales], 'DateTable'[FiscalYear] = MaxFiscalYear, 'DateTable'[FiscalQuarter] = MaxFiscalQuarter)

Create a rank measure for customers:

CustomerRank = 
RANKX(
    FILTER(ALL('Sales'[CustomerID]), NOT ISBLANK([SalesInMostRecentQuarter])),
    [SalesInMostRecentQuarter],
    , DESC, Dense
)

Add the Rank measure to a visual's filter and set it to Top N based on SalesInMostRecentQuarter.

Now, when using the time slicer, the Top N customers will update automatically based on sales in the most recent fiscal quarter.

answered Jun 19, 2025 by anonymous
• 36,180 points

Related Questions In Power BI

+1 vote
2 answers

How can I filter a dataset in Power BI to show records where a date column is less than the slicer value?

Filtering a dataset in Power BI to ...READ MORE

answered Jan 3, 2025 in Power BI by pooja
• 24,450 points
836 views
0 votes
1 answer

How can I create a dynamic date range filter that automatically adjusts based on user-selected slicer values?

To create a dynamic date range filter ...READ MORE

answered Mar 7, 2025 in Power BI by anonymous
• 36,180 points
787 views
0 votes
1 answer

How do I dynamically switch measures in Power BI based on a slicer selection while maintaining performance?

To dynamically switch between different measures in ...READ MORE

answered Mar 10, 2025 in Power BI by anonymous
• 36,180 points
830 views
0 votes
1 answer

How can I create a rolling calendar table that updates automatically based on the latest data in my fact table?

You can use either Power Query or ...READ MORE

answered Mar 13, 2025 in Power BI by anonymous
• 36,180 points
568 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,090 points
2,501 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,090 points
3,849 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
2,668 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5, 2025 2,733 views
0 votes
1 answer

How can I create a measure that calculates the weighted average of a column dynamically based on slicer selections?

Using SUMX and DIVIDE in DAX, a ...READ MORE

answered Mar 10, 2025 in Power BI by anonymous
• 36,180 points
856 views
0 votes
1 answer

I need a scatter plot where the x-axis and y-axis dynamically change based on slicer selections—how can I achieve this?

Create a scatter plot that is going ...READ MORE

answered Mar 18, 2025 in Power BI by anonymous
• 36,180 points
657 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP