Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Good morning
I currently have this chart:
From the year 2021 I have the information, that is, data in all the months, but I do not know why when comparing it with 2022 it does not show them to me. How can I fix it?
Thanks a lot
Solved! Go to Solution.
Hi @Golondrina
So you can try
Current Average = CALCULATE ( AVERAGE ( 'Table (2)'[Count] ), 'Date'[Year] = YEAR ( TODAY () ) )
Previous Average = CALCULATE ( AVERAGE ( 'Table (2)'[Count] ), 'Date'[Year] = YEAR ( TODAY () ) - 1 )
It always gets the current year from today's date.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Golondrina
Try providing a specific year value for the measure.
Previous average = CALCULATE(AVERAGE('Table (2)'[Count]),'Date'[Year]=2021)
Current Average = CALCULATE(AVERAGE('Table (2)'[Count]),'Date'[Year]=2022)
If it still doesn't work, can you provide a pbix file with fake data which can reproduce this problem? At present the measure looks good so the cause may be somewhere else.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
wanting it to be a dynamic graph and that when I have new data I do not have to modify years, I have done itby modifying the calendar table so that it has tood in 2022.
Thank you very much as well,
Hi @Golondrina
So you can try
Current Average = CALCULATE ( AVERAGE ( 'Table (2)'[Count] ), 'Date'[Year] = YEAR ( TODAY () ) )
Previous Average = CALCULATE ( AVERAGE ( 'Table (2)'[Count] ), 'Date'[Year] = YEAR ( TODAY () ) - 1 )
It always gets the current year from today's date.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@Syndicate_Admin , If you have a date then you can create a year behind measure
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
87 | |
65 | |
50 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |