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

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.

Reply
ravindrapbi
New Member

passing dynamic values in If condition while creating a new column

Hi All,

 

Hope everyone is doing great.

 

I have an issue while creating a new column in power bi desktop. i have ageing information and i need to create a ageing bucket column based on the ageing data. 

 

Here while creating the new column, there is a condition like if (ageing<(Today()-MonthEnd(Today)),"Category1",Category2"). As i am new to powerBI i am not able to solve this. Can someone please help.

 

Br,

Ravi

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Ravi,

 

Try the below Calculated Measure.

 

if( Ageing < (Format(Now(),"DD/MM/YYYY") - 

FORMAT(EOMONTH(NOW(),0),"DD/MM/YYYY")),"C1","C2").
 
Let me know if you need any help.
 
Regards,
Pavan Vanguri.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi Ravi,

 

Try the below Calculated Measure.

 

if( Ageing < (Format(Now(),"DD/MM/YYYY") - 

FORMAT(EOMONTH(NOW(),0),"DD/MM/YYYY")),"C1","C2").
 
Let me know if you need any help.
 
Regards,
Pavan Vanguri.

Thanks for the quick response Pavan. I have used the logic given by you in the expression and i got the desired result.

 

Br,

Ravi

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.