We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
So I am trying to generate a calendar from yesterdar so I tried #date(Date.Year(DateTime.LocalNow()), (Date.Month(DateTime.LocalNow())), [dias]) where dias is a column where I am getting from the day but I need to state the month and year based on yesterdar rather than today since on th 1st of every month I need to display the information of the 30th/ 31st of the last month. "DateTime.Localnow() -1 " doent work
Solved! Go to Solution.
@Anonymous - Try:
Date.AddDays(DateTime.LocalNow(),-1)
Hi,
@Greg_Deckler your solution works for a similar question I had, however can you please let me know how to remove the time that is returned next to the date? What I see when i use
is 23/12/2021 13:30:17
I would like to remove the hour/minutes/seconds please.
Many thanks
@Anonymous Just format it as only a date and note a date/time.
@Anonymous
DateTime.LocalNow() - #duration(1,0,0,0)if you prefer a form of subtraction.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@Anonymous - Try:
Date.AddDays(DateTime.LocalNow(),-1)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 7 | |
| 7 | |
| 5 |