Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi, I am stuck in getting the value for the previous year and the previous month.
My Data set is number of KPI values added every Month, I want to create a measure that compares the total of the previous year against the total of this year or Month
I am putting the KPI title in the Filter and month name and the actual value of that KPI in the table visual. Note that I have a calendar table created in M query called Date Dimension.
I have tried multiple dax formulas but not been able to get it right and it shows blank
Previous = CALCULATE(SUM('KPI'[Actual_Value]),PREVIOUSYear ('Date Dimension'[Date].[Date]))
Appreciate you help
Hi,
According to the DAX formula and output pictures you posted, I think that the problem may exist in the table relationship between the calendar table with your main table. I suggest you to go to the relationship page to check if the filter direction is both and if the relationship is enabled.
If you still have a problem with this, you can post some sample data(without sensitive data) so that we can help you to find out the root cause.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You don't specify if you are using measures or calculated columns. Beware of the filter context.
Note: You may want to use DATEADD() instead, as the other functions (including SAMEPERIODLASTYEAR) are mostly syntax sugar.
Hi, I am creating a measure - I have tried the below but it's not working with all KPI's
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |