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.
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
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 | |
99 | |
80 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |