Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
I have the below code in M that gives the number of days between the start date and end date (it works fine):
[EndDate]-[StartDate]
But if I try to subtract "1" then I get an error:
[EndDate]-[StartDate]-1
I assume it's because [EndDate] and [StartDate] are stored as dates but "1" is an integar? Please do you know how to fix?
Thanks,
CM
Solved! Go to Solution.
Replace 1 by: #duration(1,0,0,0)
Replace 1 by: #duration(1,0,0,0)
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |