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, I am working with a table that looks like this:
As you can see the Date field can be any date from the past and any date in the future. Out of this data, we want to only look at the next 10 week time frame, including current week. So for example, today is 5/4/2021. I want to look at all my counts from 5/2/2021 to 7/17/2021 in this form:
This matrix starts from Week 19 because today is 5/4, or the 19th week of the year. Next week, it should start from Week 20, and so on. I already have the columns that bring in the Current Week Start Date and 10th Week End Date as follows:
Current Week Start Date:
Solved! Go to Solution.
@RustyNails Well, if those are actually columns, you could try adding another few columns to return an actual Date for Current Week Start Date (Date) and 10th Week End Date (Date). Same formulas that you have just RETURN FirstWorkingDay without the FORMAT. Then, assuming that you have a Date column in this table, you could do something like:
IsCurrentPeriod = IF([Date] >= [Current Week Start Date (Date)] && [Date] <= [10th Week End Date (Date)],1,0)
Then just add a filter to your visual or page for IsCurrentPeriod equals 1
@RustyNails Well, if those are actually columns, you could try adding another few columns to return an actual Date for Current Week Start Date (Date) and 10th Week End Date (Date). Same formulas that you have just RETURN FirstWorkingDay without the FORMAT. Then, assuming that you have a Date column in this table, you could do something like:
IsCurrentPeriod = IF([Date] >= [Current Week Start Date (Date)] && [Date] <= [10th Week End Date (Date)],1,0)
Then just add a filter to your visual or page for IsCurrentPeriod equals 1
DOH!
So smart! That was indeed the missing piece, and my brain could not think of the if statement. Thank you once 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 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |