Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm already tired searching
This works in dax:
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Anonymous , Try this
MySales =
VAR ReportingMonth = month(maxx(allselected(fDespesas),fDespesas[data]))
RETURN CALCULATE(SUM(fDespesas[Dispêndio]);FILTER(dCalendario;MONTH(dCalendario[Date])<=ReportingMonth);KEEPFILTERS(fDespesas[Dispêndio]))
or
MySales =
VAR ReportingMonth = calculate(month(LASTDATE(fDespesas[data])))
RETURN CALCULATE(SUM(fDespesas[Dispêndio]);FILTER(dCalendario;MONTH(dCalendario[Date])<=ReportingMonth);KEEPFILTERS(fDespesas[Dispêndio]))
It worked only with MAXX. Calculate brought the same as month_Lastdate.
Hi @Anonymous ,
Glad to hear the problem has been solved. You may help accept the replies making sense as solution above. Your contribution is highly appreciated.
Best Regards,
Icey
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
It worked with MAXX
Thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |