Forum Discussion
AlexGallet01
9 years agoHelper IV
I need help
Mesure 2015-2016 = CALCULATE(SUM(Factures[2015-2016]);FILTER(ALL(Factures);Factures[Mois.Date] >= DATE(2015;07;01) && Factures[Mois.Date] <= MAX(Factures[Mois.Date]))) Bonjour, J'aimerais rempla...
Vvelarde
9 years agoCommunity Champion
hi AlexGallet01
Try in this way:
1. A Calendar table with Fiscal Year, and Fiscal Month Number Columns
Fiscal Year = IF ( MONTH ( 'Calendar'[Date] ) <= 6, 'Calendar'[Year], 'Calendar'[Year] + 1 )
Fiscal Month =
IF (
MONTH ( 'Calendar'[Date] ) <= 6,
'Calendar'[Month] + 6,
'Calendar'[Month] - 6
)2. A new Measure
ValuesThisYear =
CALCULATE (
SUM ( Table1[Value] ),
DATESBETWEEN (
'Calendar'[Date],
CALCULATE (
FIRSTDATE ( 'Calendar'[Date] ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Fiscal Year] = MIN ( 'Calendar'[Fiscal Year] )
)
),
LASTDATE ( 'Calendar'[Date] )
)
)3. Insert a slicer
4. Insert a Visual Clustered Column Chart
5. If you need to sort the months Select MonthN and Sort by Fiscal Month
AlexGallet01
9 years agoHelper IV
I use this formula
test = CALCULATE(SUM(Factures[MontantFacture]);DATESBETWEEN(Calendrier[Date].[Date];CALCULATE(FIRSTDATE(Calendrier[Date].[Date]);FILTER(ALL(Calendrier);Calendrier[AnnéeFiscal]=MIN(Calendrier[AnnéeFiscal])));
LASTDATE(Calendrier[Date].[Date])))