Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have the following scenario that I am hoping somebody can help with?
I have a Power BI report on which I would like to display some set text if today is the last Monday of the Month.
Is there a way I can check if Today() is the last Monday of the current month, if yes display 1 else 0?
The report does not have a date table as the data displayed does not have any dates in it.
Any assitance appreciated.
Solved! Go to Solution.
@msommerf
Oh srry did not read carefully. Please try
=
VAR TodayDate =
TODAY ()
VAR StartOfTheMonth =
EOMONTH ( TodayDate, -1 ) + 1
VAR EndOfTheMonth =
EOMONTH ( TodayDate, 0 )
VAR T1 =
CALENDAR ( StartOfTheMonth, EndOfTheMonth )
VAR T2 =
ADDCOLUMNS ( T1, "@Weekday", WEEKDAY ( [Date], 2 ) )
VAR T3 =
FILTER ( T2, [@Weekday] = 1 )
VAR LastMonday =
MAXX ( T3, [Date] )
RETURN
IF ( TodayDate = LastMonday, 1, 0 )
Won't that only tell me if today is a Monday? It won't tell me if it is the last Monday of the month.
@msommerf
Oh srry did not read carefully. Please try
=
VAR TodayDate =
TODAY ()
VAR StartOfTheMonth =
EOMONTH ( TodayDate, -1 ) + 1
VAR EndOfTheMonth =
EOMONTH ( TodayDate, 0 )
VAR T1 =
CALENDAR ( StartOfTheMonth, EndOfTheMonth )
VAR T2 =
ADDCOLUMNS ( T1, "@Weekday", WEEKDAY ( [Date], 2 ) )
VAR T3 =
FILTER ( T2, [@Weekday] = 1 )
VAR LastMonday =
MAXX ( T3, [Date] )
RETURN
IF ( TodayDate = LastMonday, 1, 0 )
User | Count |
---|---|
53 | |
46 | |
19 | |
16 | |
13 |
User | Count |
---|---|
108 | |
56 | |
31 | |
19 | |
18 |