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.
Hello,
I have a column (titled "PE Date") which consists of dates (ex: 1/2/2022, 1/20/2022 1/31/2022 etc).
I am trying to create an if statement where if the date is the last day of the month (ex: 12/31/, 1/31, 2/28, 3/31, 4/30 etc.) then pull in the word "Yes" and if not then "No".
Solved! Go to Solution.
Hello,
thanks for the response but what i need is for the formula to say yes its the last day of the month or no it is not the last day of the month. Your formula above finds each day in the month and pulls in the last day of the month.
what i did was changed the format of the pe date column by using the VALUE function. This turned 11/30/21 to 44530. then used a switch statement where if equal to 44530 then "yes", if not then "no".
Hi @gmasta1129 ,
Here are the steps you can follow:
1. Create calculated column.
Column =
IF('Table'[PE Date]=EOMONTH('Table'[PE Date],0),"Yes","No")
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @gmasta1129 ,
Here are the steps you can follow:
1. Create calculated column.
Column =
IF('Table'[PE Date]=EOMONTH('Table'[PE Date],0),"Yes","No")
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hello,
thanks for the response but what i need is for the formula to say yes its the last day of the month or no it is not the last day of the month. Your formula above finds each day in the month and pulls in the last day of the month.
what i did was changed the format of the pe date column by using the VALUE function. This turned 11/30/21 to 44530. then used a switch statement where if equal to 44530 then "yes", if not then "no".
Hi,
Use below Dax code for creating the column and use it in visuals :
@gmasta1129 , you can use closingbalancemonth
or with a month year column
calculate(lastnonblankvalue('Table'[Month Year], Sum(Table[Value]) )
calculate(lastnonblankvalue('Table'[Month Year], Sum(Table[Value]) , allexcept(Table, Table[Month Year]) )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |