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 trying to look at a rolling 4 weeks, so I created a sum with filter of max[date] and max[date] - 28 for my filter range. It wasn't working so I broke down the elements and i'm at the -28 date. it doesn't seem to work. I tried to do a DATE(year, month, day) and that didn't work, finding out just nomral max[date] - 28 breaks my output:
Solved! Go to Solution.
actually, thats worse. when I use my date table then it breaks the filter and shows all dates in the matrix regardless if I try to subtract days. When I use the date field in the table I'm working with it works fine as long as I don't subtract, adding the subtract breaks the filter and shows all dates with lots of empty fields.
Currently I have it giving the desired results with:
Hi,
Create a Calendar Table and build a relationship from the Date_Start column of the cwtime Table to the Date column of the Calendar Table. To your visual, drag Date from the Calendar Table. Write this measure
=CALCULATE(SUM(Data[Value]),DATESBETWEEN(Calendar[Date],MIN(Calendar[Date])-28,MIN(Calendar[Date])))
Hope this helps.
I have tried that, I do have a date table and orginally referenced that table in the query instead.
I would be willing to try again if you think it would matter, but since the date in this table is a date field, its should work. Further, functions like DAY on that filed do return the proper result.
What it seems to be doing is killing the filter on my output table, hence showing all results for all days, even though the list should only be for a narrow date range. Because of this it is apply the -1 to a blank field as that was filtered out.
Seems a bit odd, I'm able to work around it with an additional IF(BLANK) statement before I apply the -1, but I'm confused what that is necessary.
Please try again.
actually, thats worse. when I use my date table then it breaks the filter and shows all dates in the matrix regardless if I try to subtract days. When I use the date field in the table I'm working with it works fine as long as I don't subtract, adding the subtract breaks the filter and shows all dates with lots of empty fields.
Currently I have it giving the desired results with:
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 |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |