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 have a table that looks as follows:
Load Count
8/11/2019 4673
8/18/2019 3442
8/25/2019 2334
9/1/2019 4224
9/8/2019 9472
(Load - All sundays/ weekly data)
At any point, I would like the report to show only the latest 4 weeks of data (in this case 8/18, 8/25, 9/1, 9/8) .. and another example is, next week (8/25, 9/1, 9/8, 9/15)
Maybe a Dax that gives me "Last 4 weeks - Yes/NO" so that i can set the page level filter to Yes. Can this be done? Thank you!
Solved! Go to Solution.
@Anonymous please try this
Rank = RANKX('Table','Table'[Load],,DESC,DENSE)
Hi Akshaya,
You could create a slicer table like below
Then create a measure like below
Measure 6 = SWITCH ( TRUE (), SELECTEDVALUE ( 'slicer'[slicer] ) = "next week", CALCULATE ( SUM ( 'month'[count] ), FILTER ( 'month', WEEKNUM ( 'month'[Load] ) >= WEEKNUM ( TODAY () ) - 3 && WEEKNUM ( 'month'[Load] ) <= WEEKNUM ( TODAY () ) + 1 ) ), SELECTEDVALUE ( 'slicer'[slicer] ) = "last4week", CALCULATE ( SUM ( 'month'[count] ), FILTER ( 'month', WEEKNUM ( 'month'[Load] ) >= WEEKNUM ( TODAY () ) - 4 && WEEKNUM ( 'month'[Load] ) <= WEEKNUM ( TODAY () ) ) ) )
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Akshaya,
You could create a slicer table like below
Then create a measure like below
Measure 6 = SWITCH ( TRUE (), SELECTEDVALUE ( 'slicer'[slicer] ) = "next week", CALCULATE ( SUM ( 'month'[count] ), FILTER ( 'month', WEEKNUM ( 'month'[Load] ) >= WEEKNUM ( TODAY () ) - 3 && WEEKNUM ( 'month'[Load] ) <= WEEKNUM ( TODAY () ) + 1 ) ), SELECTEDVALUE ( 'slicer'[slicer] ) = "last4week", CALCULATE ( SUM ( 'month'[count] ), FILTER ( 'month', WEEKNUM ( 'month'[Load] ) >= WEEKNUM ( TODAY () ) - 4 && WEEKNUM ( 'month'[Load] ) <= WEEKNUM ( TODAY () ) ) ) )
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try this:
= IF( [Load] >= TODAY() - 30, "Y", BLANK() )And then you can filter Y!
@Anonymous one way of doing that would be through calculated columns as following
Rank = RANKX('Table','Table'[Load],,DESC)
and always put filter from 1-4
@smpa01 This is the output i am getting. Week Rank is a calculated column (Dont Summarize enabled)
@Anonymous please try this
Rank = RANKX('Table','Table'[Load],,DESC,DENSE)
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 | |
89 | |
68 | |
61 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |