Home / Power BI / How to display sales data in the past 30-60-90 days

How to display sales data in the past 30-60-90 days

On this Page

Social Shares

In this blog, I’ll explain how to calculate sales for the past 30-60-90 days and display sales data with the help of the Slicers.

The steps we take to display sales data in the past 30-60-90 days
Step1.
Create a table with the help of Enter Data option.

Step2. The table we have created in the above steps will be used in the slicer to filter the data for the 30/60/90/days range.

Step3. Create a new measure for calculating the past 30/60/90 Days’ sales.

Logic:-
Last 30/60/90 Days sale =

var days_30=CALCULATE(sum(‘Orders'[Sales]),FILTER(‘Date Table’,’Date Table'[Date]>=TODAY()-29&& ‘Date Table'[Date]<=TODAY()))

var days_60=CALCULATE(sum(‘Orders'[Sales]),FILTER(‘Date Table’,’Date Table'[Date]>=TODAY()-59&& ‘Date Table'[Date]<=TODAY()))

var days_90=CALCULATE(sum(‘Orders'[Sales]),FILTER(‘Date Table’,’Date Table'[Date]>=TODAY()-89&& ‘Date Table'[Date]<=TODAY()))

return

IF(MAX(‘Table'[Last 30/60/90 Days Sale])=”30 Days”,days_30,

IF(MAX(‘Table'[Last 30/60/90 Days Sale])=”60 Days”,days_60,

IF(MAX(‘Table'[Last 30/60/90 Days Sale])=”90 Days”,days_90)))

Step4. Drag the measure in the card and select the value in the slicers.

You can see in the screenshot above that shows the sales value for the 30 days. We’ll choose the slicers if you want to show 60 or 90 days.

Rahul Prajapati
Data  Analyst

Author By

Kamal Sharma

Kamal brings over 20 years of experience in data analytics and business intelligence. He has led the design and implementation of analytics solutions across operations, financial reporting, and performance improvement initiatives. With a background in business statistics and Six Sigma, his work focuses on applying data in a structured and practical way to solve real business challenges.

Author By

Kamal Sharma

Kamal Sharma

Kamal brings over 20 years of experience in data analytics and business intelligence. He has led the design and implementation of analytics solutions across operations, financial reporting, and performance improvement initiatives. With a background in business statistics and Six Sigma, his work focuses on applying data in a structured and practical way to solve real business challenges.

Decision-Ready Analytics

Turn your OEE dashboard into a decision system.

Book a 30-minute working session with our manufacturing analytics team.
Translate »