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.
Trying to use an IF Statement to calculate if a date is in the current month.
When I take out "&&" it works fine, any ideas?
Audit In Current Month = IF ( YEAR ( 'Power BI List'[Visit 1 Date] ) = YEAR ( TODAY () ) && MONTH ( 'Power BI List'[Visit 1 Date] ) = MONTH ( TODAY () ), "1", "0" )
Thanks!
🙂
Solved! Go to Solution.
Hi @bnisbet,
What error did you get?
Based on my test, the formula you provided above should work.
Regards
Hi @bnisbet,
What error did you get?
Based on my test, the formula you provided above should work.
Regards
By the way, why you don't use IF AND?
Try this:
Audit In Current Month = IF ( AND ( YEAR ('Power BI List'[Visit 1 Date] ) = YEAR ( NOW() ), MONTH ('Power BI List'[Visit 1 Date] ) = MONTH ( NOW() ) ), "1", "0" )
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |