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,
If I write this formula in a measure, I get the good result as it calculates the amount of sales for the next year.
Solved! Go to Solution.
Hi @jsteffe ,
It is because of the row context,you need to correct your expression as below:
CALCULATE(SUM(Sales[amount]),'Sales',NEXTYEAR('Calendar'[Date]))
Hi @jsteffe ,
It is because of the row context,you need to correct your expression as below:
CALCULATE(SUM(Sales[amount]),'Sales',NEXTYEAR('Calendar'[Date]))
Because you are in Row context, you likely need to break out of row context using ALL.
CALCULATE(SUM(ALL(Sales[amount]));NEXTYEAR('Calendar'[Date]))
Hi Greg,
Your proposal :
CALCULATE(SUM(ALL(Sales[amount]));NEXTYEAR('Calendar'[Date]))
doesn't work because the first parameter of SUM function requires the name of a column.
I created a table Calendar and a relationship between this table and my table Sales. That's why in the row context I thought that this formula will calculate for each row the total amount of sales for the next year (of my actual row)
Hi @jsteffe ,
Have you tried my measure?I have tested here and it works.
Sorry I did'nt see your reply.
It perfectly works. Thanks.
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 |
---|---|
111 | |
94 | |
83 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |