Forum Discussion
date creation
Good afternoon
I have two tables. In the one I split a particular date into a DAY , MONTH and YEAR. I need to use the MONTH and YEAR from this table and the DAY from another table in this way:
I have issues with Teams. It doesn't work well with me.
But send me your email and I'll send you a Zoom meeting invitation.
Ken Tyler
5 Replies
- Greg_DecklerCommunity Champion
Well, would need to better understand the data to say anything definitive. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
But I suppose you might need to check to make sure that you are not getting a text value or something odd for your Payment Day Related.
- kentylerSolution Sage
VAR pay_year ='Payment Summary'[Payment Year]
VAR pay_month = 'Payment Summary'[Payment MONTH use]
VAR pay_day = 'Payment Summary'[Payment DAY related]
VAR pay_year_OK = pay_year >0
VAR pay_month_OK = pay_month > 0 && pay_month <=12
VAR pay_day_OK = pay_day > 0 && pay_day <=31
Result = IF(pay_year_OK && pay_month_OK && pay_day_OK,date(pay_year,pay_month,pay_day), "Error in year, month or day")
RETURN Result
You could put more complex logic on the limits for pay_day depending on the value of pay_month
- MarcUrdangPost Patron
Hi .. thank you so much for your quick response .. I am a fairly new user adn although I'm sure what you sent is fairly easy I am not entirely sure how to do replicate in my model. Would you be able to spend a minute via Teams so I can share my screen and you can talk me through it?
thanks
Marc
- kentylerSolution Sage
I have issues with Teams. It doesn't work well with me.
But send me your email and I'll send you a Zoom meeting invitation.
Ken Tyler