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.
Hi all,
I have been doing some reading on SAMEPERIODLASTYEAR and am obviously missing something important.
I am trying to achieve the following:
For reference, the values displayed are a simple sum of one column and the X-axis is based on yearly bins of a column with daily dates.
Does anyone have any suggestion?
Thanks,
OF
Solved! Go to Solution.
HI @Anonymous,
First, stacked/clustered column charts not support secondary y axis, current line and stacked column chart/clustered column charts support secondary y axis which can only used with line value field.
Second, when you enable legend on stacked/clustered column charts, it is impossible to use multiple value fields. You can only display current year or previous year values base on date column.
Sample measure formulas to create different visuals:
Current= CALCULATE ( SUM ( Table[Amount] ), VALUES ( Table[Date] ) ) Previous Year= CALCULATE ( SUM ( Table[Amount] ), SAMEPERIODLASTYEAR ( VALUES ( Table[Date] ) ) )
Notice: dax time intelligence functions are fixed and not support apply on complex filters and advanced customize, if your scenario is over their limit, please try to use date function with filters to manually coding conditions and point out date range.
Regards,
Xiaoxin Sheng
HI @Anonymous,
First, stacked/clustered column charts not support secondary y axis, current line and stacked column chart/clustered column charts support secondary y axis which can only used with line value field.
Second, when you enable legend on stacked/clustered column charts, it is impossible to use multiple value fields. You can only display current year or previous year values base on date column.
Sample measure formulas to create different visuals:
Current= CALCULATE ( SUM ( Table[Amount] ), VALUES ( Table[Date] ) ) Previous Year= CALCULATE ( SUM ( Table[Amount] ), SAMEPERIODLASTYEAR ( VALUES ( Table[Date] ) ) )
Notice: dax time intelligence functions are fixed and not support apply on complex filters and advanced customize, if your scenario is over their limit, please try to use date function with filters to manually coding conditions and point out date range.
Regards,
Xiaoxin Sheng
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |