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.
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!
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 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |