The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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])
Solved! Go to Solution.
Try this once,
CALCULATE(SUM([Sales]), ALL(Tablename), [Startdate]>=MIN([Startdate]))
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] )
)