Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I need to extract previous month for today.
I tried previousmonth= date(year(today ()),month(today) - 1,day(today()))
But it displays 02/03/2021 which is wrong, how to correct it please?
Solved! Go to Solution.
@Anonymous , because there is no 30th in feb , Try a measure like
previousmonth = Var _1 = date(year(today ()),month(today()) - 1,day(today())) Return if(EOMONTH(today(),-1) < _1, EOMONTH(today(),-1) , _1)
@Anonymous , because there is no 30th in feb , Try a measure like
previousmonth = Var _1 = date(year(today ()),month(today()) - 1,day(today())) Return if(EOMONTH(today(),-1) < _1, EOMONTH(today(),-1) , _1)
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
99 | |
94 | |
38 | |
30 |