Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Guys
How do I do an if statement
If statement, if date < than current month, measure1, measure2
| 01/01/2018 | 01/02/2018 | 01/03/2018 | 01/04/2018 | 01/05/2018 | 01/06/2018 | 01/07/2018 | 01/08/2018 | 01/09/2018 | 01/10/2018 | 01/11/2018 | 01/12/2018 | |
| values | 1 | 2 | 4 | 7 | 8.5 | 10.5 | 12.5 | 14.5 | 10 | 15 | 10 | 20 |
| If date is < than current month, then populate values from a field, if date >= show values as a calculation | Calculated values, another measure |
Solved! Go to Solution.
Hi @KH11NDR
Create a measure for First day of month ;
First day of month = DATE(YEAR( TODAY()),MONTH( TODAY()),1)
Then use this measure in your condition:
Column = IF(Table1[Date]< [First day of month], Measure 1,Measure 2)
Hope this helps.
Thanks
Raj
Hi @KH11NDR
Create a measure for First day of month ;
First day of month = DATE(YEAR( TODAY()),MONTH( TODAY()),1)
Then use this measure in your condition:
Column = IF(Table1[Date]< [First day of month], Measure 1,Measure 2)
Hope this helps.
Thanks
Raj
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |