Forum Discussion
ravindrapbi
7 years agoNew 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
- Anonymous7 years ago
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.
2 Replies
- AnonymousNot 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.- ravindrapbiNew Member
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