Forum Discussion
Anonymous
7 years agoNot applicable
Last month and Last Week DAX Formulas
Hi There, I am fairly new to power BI and trying to figure this out.. I want to create a date table that will have a series how collumns that show a "Yes" or "No" value based on specfied date ran...
- Anonymous7 years ago
Hi Xioxin,
Thanks for the reply. I tried that and still get the same error.
The "," is working when I use it in other formulas. Example this works:
Yesterday =
IF (
YEAR ( [Date] ) = YEAR ( TODAY () )
&& DAY ( [Date] ) = DAY ( TODAY () -1 ),
"Yes",
"No"
)
Greg_Deckler
7 years agoCommunity Champion
Perhaps:
Last Month = IF ( YEAR ( [Date] ) = YEAR ( TODAY () ) && MONTH( [Date] ) = MONTH( TODAY ()) -1 ), "Yes", "No" )
Last Week =
IF (
YEAR ( [Date] ) = YEAR ( TODAY () )
&& WEEKNUM ( [Date] ) = WEEKNUM ( TODAY ()) -1 ),
"Yes",
"No"
)
Anonymous
7 years agoNot applicable
Hi, how will you obtain the first date and last dates of last 2 weeks for the first , second and third weeks of January?