Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Need some guidance to see if I'm going about this the right way.
I'm trying to create a YoY sales Variance that calculates the variance relative to the year selected in a Year filter; this is so the consumer can click through years; see that years sales and the variance +/- to previous year.
I've been able to calculate the selected Years' Sales relative to the slicer with this below, but the when I try to create the year before sales, same calculation but amending the: YEARSTART-1 and YEAREND-1) relative to the slicer it returns blank.
Total Job Bill = VAR YEARSTART = SELECTEDVALUE( FactJobEntry[Key Date.Year] , MIN( FactJourney[Key Date.Year] ) ) VAR YEAREND = SELECTEDVALUE( FactJobEntry[Key Date.Year] , MAX( FactJourney[Key Date.Year] ) ) VAR TOTALJOBBILL = SUM( FactJobEntry[Bill Net] ) RETURN CALCULATE( TOTALJOBBILL, DATESBETWEEN( FactJobEntry[Key Date], DATE( YEARSTART, 1, 1 ) , DATE( YEAREND, 12, 31 ) ) )
Solved! Go to Solution.
Found an answer using
Total PY Job Bill = IF ( ISCROSSFILTERED( DimCalendar[DimYear] ), CALCULATE( [Total Job Bill], SAMEPERIODLASTYEAR( DimCalendar[Date] )), BLANK())
Found an answer using
Total PY Job Bill = IF ( ISCROSSFILTERED( DimCalendar[DimYear] ), CALCULATE( [Total Job Bill], SAMEPERIODLASTYEAR( DimCalendar[Date] )), BLANK())
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |