Forum Discussion
Rocky_Brown
Helper I
4 years agoPrior Year Sales Data
I have a sales table that has Fiscal Month, and Fiscal Year as Numeric fields. I am interested in getting the prior year sales data from those columns.
I tried creating a measure:
Prior Yr Sales =
CALCULATE(SUM('Historic Commissions Data'[NetSales),
PreviousYear('Historic Commissions Data'[Fiscal Year]))
However, due to the [Fiscal Year] column being a numeric field, not a date field, it doesn't work.
Is there another way of getting this data?
Thank you,
5 Replies
- Samarth_18
Community Champion
Hi Rocky_Brown ,
Please try this:-
Prior Yr Sales = CALCULATE ( SUM ( 'Historic Commissions Data'[NetSales] ), FILTER ( 'Historic Commissions Data', 'Historic Commissions Data'[Fiscal Year] = YEAR ( TODAY () ) - 1 ) )Thanks,
Samarth
- Rocky_Brown
Helper I
I need the prior year sales data to coincide with the prior year fiscal period. This doe not work, thank you, though
- Samarth_18
Community Champion
Rocky_Brown Do you have date field in your table?