Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
In power bi I have a data segmentation visual based on the week number, which in turn takes the week number information from a calendar table.
The filter is working correctly but I would like to know if there is a way when I open the powerbi file that the week number can be updated automatically and not manually.
For example, I can set the filter between week 1 and week 52 (last week of the year) and all the data will appear, but I would like it to calculate the current week automatically and not have it inputted automatically. manually.
For example, at this moment, when I open the file I have, the filter is from week 1 to week 21, according to the image I added, and I can only change this if I do it manually.
Thanks
Solved! Go to Solution.
Apply the Filter to Your Visual:
Go to the visual where you want to apply the filter.
Drag the IsCurrentWeek measure to the Filters pane.
Set the filter to show only items where IsCurrentWeek is TRUE.
Proud to be a Super User! |
|
Tks, that works.
But a measure can't be added to a field right?
Apply the Filter to Your Visual:
Go to the visual where you want to apply the filter.
Drag the IsCurrentWeek measure to the Filters pane.
Set the filter to show only items where IsCurrentWeek is TRUE.
Proud to be a Super User! |
|
@lmpb1988 , For this you can create a measure first make sure you have a date table with week number
Calendar =
ADDCOLUMNS (
CALENDAR (DATE(2023, 1, 1), DATE(2023, 12, 31)),
"Year", YEAR([Date]),
"Month", MONTH([Date]),
"Week Number", WEEKNUM([Date], 2) -- 2 indicates that the week starts on Monday
)
Then create a new column in this date table to calculate current week
CurrentWeek =
IF (
YEAR(TODAY()) = [Year],
WEEKNUM(TODAY(), 2),
BLANK()
)
Then create a measure for current week
CurrentWeekMeasure = WEEKNUM(TODAY(), 2)
Use this instead of Numweeked
Proud to be a Super User! |
|
User | Count |
---|---|
123 | |
76 | |
63 | |
50 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |