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.
I created a new measure to calculate the accumulated quantities
The measure calculates the values until the end of the year but what I wanted was for the calculation to be done only up to the current month or up to the maximum date it finds
Accumulated Quantities =
IF(
ISFILTERED('Database'[Date]),
ERROR("Primary date."),
TOTALYTD(SUM('Database'[Quantity]), 'Database'[Date].[Date])
)
Solved! Go to Solution.
Try:
Cumulative value =
IF (
MAX ( Database[Data].[Date] ) < TODAY (),
CALCULATE (
SUM ( Database[Preço Líquido (MBase)] ),
FILTER (
ALL ( 'Database' ),
Database[Data].[Date] <= MAX ( Database[Data].[Date] )
)
)
)
Proud to be a Super User!
Paul on Linkedin.
Try:
Cumulative value =
IF (
MAX ( Database[Data].[Date] ) < TODAY (),
CALCULATE (
SUM ( Database[Preço Líquido (MBase)] ),
FILTER (
ALL ( 'Database' ),
Database[Data].[Date] <= MAX ( Database[Data].[Date] )
)
)
)
Proud to be a Super User!
Paul on Linkedin.
thanks for your help my friend
I took part of the formula you sent me and it was like this
@ngomes , Example with help from date tbale
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))
or
calculate(SUM('Database'[Quantity]), filter(allselected('Database') , 'Database'[Date] <= max('Database'[Date]) ) )
or
calculate(SUM('Database'[Quantity]), filter(all('Database') , 'Database'[Date] <= max('Database'[Date]) ) )
I've already tested the formulas, but I still have the same problem
notice the example I put
in December I have no values and the sum goes from November to December