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.
I'm attempting to calculate the previous month's total spent for individual items on a table. The formula I'm currently using to create a new column is:
PreviousTotalSpent = CALCULATE(SUM('Item Sales'[Total Spent]),DATEADD('Item Sales'[Date],-1,MONTH))
I've used this formula on a Google Analytics dashboard I created in Power BI and it worked just fine. However, when using it now I'm receiving blank values on my table. I have no idea why this is occuring. I thought maybe it was my column data types that were interfering with the calculation, however when I use SUM on the TotalSpent column, it sums up correctly. DATEADD also works on the date column. It's only when I include both in the calculation formula above that the results do not appear.
Here is what I am seeing:
Any idea what is going on?
Solved! Go to Solution.
Hi,
That formula needs to be a measure, not a calculated column formula.
Hi @Anonymous,
I also agree with Ashish_Mathu.
Please try with create the measure with that formula then you will get the value.
Best Regards,
Cherry
Hi,
That formula needs to be a measure, not a calculated column formula.
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |