Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
1 How to create the "Previous month Last date" measure in Power Bi desktop ?
2 Fromdate
case
when (?p_DateSelection? = 'DR')
then (?p_FromDate?)
when (?p_DateSelection? = 'PM')
then ([PM Start date])
ELSE ([PreviousDay])
end
3 To Date
case
when ( ?p_DateSelection? = 'DR')
then (?p_ToDate?)
when ( ?p_DateSelection? = 'PM')
then ([PM End date])
ELSE ([PreviousDay])
end
Please convert above 2 and 3 expressions to Power Bi desktop.
ThanksinAdvance.
Hi , @anjanikumar
I don't know much about Cognos' syntax and your business logic.
For "Previous month last date", you can use the EDATE() or EOMONTH() function.
For your question, can you provide us with some sample data and the output you want (in tabular form) so that we can better help you.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!