Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
anjanikumar
Helper II
Helper II

Convert this Cognos expressions to Power Bi !!

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.

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.