top of page

Monthly-Yearly Category wise Revenue analysis.

Requirement

Introduction: Category-wise revenue analysis is essential for understanding how different product categories contribute to overall business performance. This analysis focuses on evaluating revenue trends by category, with a detailed breakdown of monthly and yearly revenue. Such an approach enables organizations to align their efforts with market demands and enhance overall profitability.

 

Requirements:

 

Read the table 'sales_data_analysis'

 

* Extract Year and Month from the Sales_Date column to facilitate monthly and yearly trend analysis. Group the data by Category, Year, and Month wise. Sum of Sales_Amount for each category in a specific month or year. Count of transactions for each category to measure activity level.

 

Final Output: Show the results by Total Revenue to identify the top-performing categories.

 

Write the Pyspark code without syntax error.

 

Unity Catalog: sales_data_analysis

Purgo AI Agentic Code

bottom of page