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
Good day,
I have a measure that calculate the number of ressources needed based on a number of vessels ([NBR VESSELS GC]) . The number of vessels is increasing on a monthly basis.
Solved! Go to Solution.
@Steph83 , the error means that the Power BI does not know what to compare the DATE value against. What is the Date field in the fact table? For an example, if your fact table is called 'FactVessels' and the date field is [Date], then your measure might work something like this:
Needs 2023 = CALCULATE([NB GC ENGINEER NEEDS MRS],'factVessels'[Date] = DATE(2024,01,01))- CALCULATE([NB GC ENGINEER NEEDS MRS],'factVessels'[Date] = DATE(2023,01,01))
you will need to provide some sample data, as well as what your expected result from that sample data is.
this is not enough information without understanding how your data is structured.
I also think using a switch statement for your nested if statements is recommended because the readability is very difficult with what you doing. However if you provide sample data with your expected result from that data, there might be a easier way to calculate this.
Proud to be a Super User!
@Steph83 , the error means that the Power BI does not know what to compare the DATE value against. What is the Date field in the fact table? For an example, if your fact table is called 'FactVessels' and the date field is [Date], then your measure might work something like this:
Needs 2023 = CALCULATE([NB GC ENGINEER NEEDS MRS],'factVessels'[Date] = DATE(2024,01,01))- CALCULATE([NB GC ENGINEER NEEDS MRS],'factVessels'[Date] = DATE(2023,01,01))
It works, thanks!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 20 | |
| 18 |