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 all,
i have the below formula in excel which basically checks today's date and if before this month 23rd day then it puts the 15th of this month, if todays date is more than 23rd of this month then it puts the 15th of the next month.
=IF(OR((($C2)="Option1"),(($C2)="Option2")),IF(DAY($E2
<=23,DATE(YEAR($E2),MONTH($E2)+1,15),EOMONTH($E2,1)+15),$E2)
how can i transform it to be used in a column or measure in Power BI?
thank you in advance
Solved! Go to Solution.
Please try
Amount to be paid on =
IF (
OR ( [Charge] = "Text 1", [Charge] = "Text 2" ),
IF (
DAY ( [Transcation Date] ) <= 23,
DATE ( YEAR ( [Transcation Date] ), MONTH ( [Transcation Date] ) + 1, 15 ),
EOMONTH ( [Transcation Date], 1 ) + 15
),
[Transcation Date]
)
Hi @CJKPowerBI
Same formula should work just fine for a calculated column, just replace the cell references with column references.
In a calculated column the syntax is the same, you just have to change 2 things:
$C2 must be the column in your table
$E2 must be another column in your table (where you have the data)
My formula gives me an error after those modifications, can you have alook and maybe paste the formula for PowerBi here pls?
Below is the formula:
Amount to be paid on = IF(OR(([Charge]="Text 1"),([Charge]="Text 2")),IF(DAY([Transcation Date]<=23,DATE(YEAR([Transcation Date],MONTH([Transcation Date])+1,15),EOMONTH([Transcation Date],1)+15),[Transcation Date])
Please try
Amount to be paid on =
IF (
OR ( [Charge] = "Text 1", [Charge] = "Text 2" ),
IF (
DAY ( [Transcation Date] ) <= 23,
DATE ( YEAR ( [Transcation Date] ), MONTH ( [Transcation Date] ) + 1, 15 ),
EOMONTH ( [Transcation Date], 1 ) + 15
),
[Transcation Date]
)
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |