Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
How do I rank a sum of a value utilizing a date to calcluate the past 7 days?
Currently I have a calc column:
ThisWeekLastWeek = IF([Local Date]>=TODAY()-7,"This Week",IF(AND([Local Date]>=TODAY()-14,[Local Date]<TODAY()-7),"Last Week"))
Solved! Go to Solution.
Hi,
I went about it this way: rather than creating a week column like you did, I simply created a measure for "Sales Last 7 Days":
Thanks for the quick reply. I ended up using a measure as you mentioned. But what really helped me was using a date dimension to calculate the last 7 days. I have noticed that whenever I'm using time for anything, my data is skewed if I dont use a date table. That helped me get the right values...then I needed to rank them - and I used the Top N function for the CATEGORY, (not the measure itself which stumped me for a while since it was not available at the measure level).
Thanks again!
Hi,
I went about it this way: rather than creating a week column like you did, I simply created a measure for "Sales Last 7 Days":
Thanks for the quick reply. I ended up using a measure as you mentioned. But what really helped me was using a date dimension to calculate the last 7 days. I have noticed that whenever I'm using time for anything, my data is skewed if I dont use a date table. That helped me get the right values...then I needed to rank them - and I used the Top N function for the CATEGORY, (not the measure itself which stumped me for a while since it was not available at the measure level).
Thanks again!