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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
amartinez246
New Member

Data Short

I have an excel which i am sourcing the data from, this includes invoice dates back for 2005, I have created a date table to group sales by year but visually I have not been able to short so that when comparing 2018 to 2019 the top products for 2019 appear first. Any advice on how to do this ?

1 REPLY 1
v-xuding-msft
Community Support
Community Support

Hi @amartinez246 ,

I’m a little confused for your requirement. Do you want to compare the total sales between 2018 and 2019 ?  I create a sample for calculating subtraction of total sales between two years.

 

I have two tables. The “Table” is a calendar table. The columns of A and B in Table1 are the different category of products. There  is a many-to-one relationship between two tables. And I just calculate the sales of A. B is the same as A.

0.png1.jpg

total = SUM(Table1[A])

2018 A = CALCULATE(SUM(Table1[A]),DATEADD('Table'[Date].[Date],-1,year))

2018-2019 = IF( ISBLANK([2018 A]),BLANK(),[2018 A] -[total] )

2.jpg

If I understand incorrectly, please post some sample data.

 

Best Regards,

Xue Ding

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.