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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bilibi2928
Advocate I
Advocate I

Sales Analysis: Top 10

My team wants to analyze their sales data using Power BI. They have already loaded their data into Power BI, and they want to calculate the sales performance of their top 10 products over the past year. How can we do this? 

 

 

1 REPLY 1
grantsamborn
Solution Sage
Solution Sage

Hi @bilibi2928 

Would the following 2 measures help?

 

Last Year = 
    CALCULATE(
        [Sales],
        DATESBETWEEN(
            'Date'[Date],
            DATEADD( LASTDATE( 'Date'[Date] ), -1, YEAR ),
            LASTDATE( 'Date'[Date] )
        )
    )


Rankx = 
    RANKX(
        ALL( 'Product' ),
        [Last Year],
        ,
        DESC
    )

 

[Rankx] can be used to filter a visual.

Let me know if this helps.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.