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.
Hello everyone,
I want to automatically calculate the sales in the month of February. Here is my preliminary DAX. How can I target the end of the month of February due to the leap year. In other words, it doesn't matter whether February has 28 or 29 days, it should always calculate sales until the end of February.
Umsatz feb auto = SUMX(FILTER(AUDOK,AUDOK[DokDatum]>=DATE(YEAR(TODAY()),2,1) && AUDOK[DokDatum]<=Date(YEAR(TODAY()),2,29)),[Umsatz])
Thank you for any help.
Solved! Go to Solution.
@azaterol
Use this measure:
Umsatz feb auto =
VAR __MonthFebStart =
DATE ( YEAR ( TODAY () ), 2, 1 )
VAR __MonthFebEnd =
EOMONTH ( __MonthFebStart, 0 )
RETURN
SUMX (
FILTER (
AUDOK,
AUDOK[DokDatum] >= __MonthFebStart
&& AUDOK[DokDatum] <= __MonthFebEnd
),
[Umsatz]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@azaterol
Use this measure:
Umsatz feb auto =
VAR __MonthFebStart =
DATE ( YEAR ( TODAY () ), 2, 1 )
VAR __MonthFebEnd =
EOMONTH ( __MonthFebStart, 0 )
RETURN
SUMX (
FILTER (
AUDOK,
AUDOK[DokDatum] >= __MonthFebStart
&& AUDOK[DokDatum] <= __MonthFebEnd
),
[Umsatz]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
85 | |
83 | |
66 | |
60 | |
58 |
User | Count |
---|---|
194 | |
111 | |
105 | |
79 | |
71 |