📊My Video Content Website
learnwithritesh.graphy.com
📊My Official Blog Website
dancesingwithdata.com
#powerbi
DAX Question on PL 300
Here's the scenario: I've set up a "Date" table in Power BI that spans from January 1, 2000, to January 1, 2030. Now, what I'm aiming for is to have a date slicer or filter on my dashboard that automatically defaults to the current week, meaning from the first day of the week through the last. For instance, today is March 15, 2024, so ideally, the slicer should default to March 11, 2024, through March 17, 2024.
A. Create a Column week number =
var _number=WEEKNUM('Calendar Table'[Date])
var _today=WEEKNUM(TODAY())
return SWITCH(TRUE(),_number=_today,"Current","Other Weeks")
B. Create a Measure as week number =
var _number=WEEKDAY('Calendar Table'[Date])
var _today=WEEKNUM(TODAY())
return SWITCH(TRUE(),_number=_today,"Current","Other Weeks")
C. Create a Measure week number =
var _number=WEEKNUM('Calendar Table'[Date])
var _today=DATEADD (TODAY(),1,1)
return SWITCH(TRUE(),_number=_today,"Current","Other Weeks")
D. Create a Column as week number =
var _number=WEEKNUM('Calendar Table'[Date])
var _today=WEEKNUM(TODAY())
return SWITCH(TRUE(),_number=_today,"Current","Other Weeks")
ANSWER IS A
17 мар 2024