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've looked all around and tried many options found in the forums but cannot get anything to work.
I have a matrix showing spend filtered to one category (out of ten),
the dates are Start of Week from my Date Table and
the amounts come from the following measure
What I need are two measures I can use in cards and most likely other visuals.
I tried using the original calculation in the Spend by Category measure but I end up not being able to filter to the Category I need and the averages are way off and every solution from the forums I tried either gave me the wrong amounts, a blank value or an error.
Any help would be appreciated!
Solved! Go to Solution.
I would break the problem into two. First look at prior fiscal month calculations, then rolling average calculations.
Are you thinking of prior fiscal month as always being from today or (for example) are you allowing users to filter the report to May, in which case the prior fiscal month is April? If the former, can you make an isPriorFiscalMonth column in your date table? This would be a boolean with the idea that you filter on this later. If the latter can you add PriorFiscalMonth and PriorFiscalMonthYear columns to your date table? For example, for 12/05/2023 these might be 4 & 2023 and for 12/01/2023 these might be 12 & 2022 (depending on how your fiscal periods work).
Once you've got these in place you should have a much easier time of it doing your rolling averages as you will just be doing some simple filters rather than simultaneously having to do a load of date-math.
I would break the problem into two. First look at prior fiscal month calculations, then rolling average calculations.
Are you thinking of prior fiscal month as always being from today or (for example) are you allowing users to filter the report to May, in which case the prior fiscal month is April? If the former, can you make an isPriorFiscalMonth column in your date table? This would be a boolean with the idea that you filter on this later. If the latter can you add PriorFiscalMonth and PriorFiscalMonthYear columns to your date table? For example, for 12/05/2023 these might be 4 & 2023 and for 12/01/2023 these might be 12 & 2022 (depending on how your fiscal periods work).
Once you've got these in place you should have a much easier time of it doing your rolling averages as you will just be doing some simple filters rather than simultaneously having to do a load of date-math.
@Chris_White While I had to jump through additional hoops to get to my final answer your suggestion put me on the right track. Thank you!!
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 |
---|---|
100 | |
100 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
106 | |
104 | |
85 | |
73 |