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.
Hello everyone, I’m new in the community and I have the following issue:
I’ve created a measure to calculate the increase/decrease over the same period of the previous year. When I use the month in category it’s accumulating the increase/decrease no matter the year of the data.
I’d like to use a filter into the DAX to get the same result I get when I’m using the filter panel or selecting the data on other chart.
The measure I’m using is:
Variação Vendas sobre Ano anterior = sum(Base_de_Dados[Valor Faturado])-
CALCULATE(sum(Base_de_Dados[Valor Faturado]);SAMEPERIODLASTYEAR(Calendario[Data]))
I’ve tried to use an YEAR(MAX(table[date])) and/OR FILTER() into the CALCULATE function but isn’t working.
Any ideas?
Tks
Solved! Go to Solution.
Hello,
I've been able to get the result filtering the visual by TOP N 1 Max Year.
Thank you for your support.
Regards.
Hi @r_fioretti ,
Please try to create a measure as below:
Variação Vendas sobre Ano anterior =
SUM ( 'Base_de_Dados'[Valor Faturado] )
- CALCULATE (
SUM ( 'Base_de_Dados'[Valor Faturado] ),
DATEADD ( 'Base_de_Dados'[Date], -1, YEAR )
)
Best Regards
Rena
Hello,
Thank you for your answer, however it didn’t work. When I apply a filter on other report I get an error. 😞
Hi @r_fioretti,
Could you please provide the screenshot with that error info if it is convenient? Thank you.
Best Regards
Rena
Hello,
I've been able to get the result filtering the visual by TOP N 1 Max Year.
Thank you for your support.
Regards.
Hi @r_fioretti,
Is there anything else that can help you for this thread? If no, could you please mark it as Answered? Thank you.
Best Regards
Rena
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
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 |
---|---|
105 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |