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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AdilFS
Frequent Visitor

Calculate Sales from start date

Need to calculate sales of a shop from start date of a shop.
I have 2 tables : Sales and Date
In Sales table I have information about volume of sales.
In Date table I have shop start date.
I have tried to use that code:

 

SWS comp = 
CALCULATE(Sales[sales], [Start Date] >= [Start Date])​

 

1 ACCEPTED SOLUTION

Try this once,

CALCULATE(SUM([Sales]), ALL(Tablename), [Startdate]>=MIN([Startdate]))

View solution in original post

5 REPLIES 5
devanshi
Helper V
Helper V

Total Sales = 
VAR startdate = FIRSTDATE([Startdate])
CALCULATE(SUM([Sales]) , [Startdate] >= startdate)

There is an issue with syntax

Try this once,

CALCULATE(SUM([Sales]), ALL(Tablename), [Startdate]>=MIN([Startdate]))

Any other way?

If you have ID of shop or sales you can try this:

Total Sales = CALCULATE(SUM([Sales]) ,
                                             FILTER('Tablename', [SalesID] =  SELECTEDVALUE([SalesID]) && 
                                                              [StartDate] = MIN[StartDate]                                                                                                        )
                                )

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.