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.
I am trying to create a date add formula for datetime value in Power BI. The Power BI is linked to Analysis Service. My measure is DateAdd('Table1'[DateField],1,MONTH) I receive the folowing error The report measure has a syntax or semantic error at line 1, postion 2, reported by Analysis Sercices 'Function DATEADD' expects a contagious selection when the date columns is not unique, has gaps or contains a time portion. Can anyone help?
@system243trd , yes Dateadd needs a continuous date. so if you do not have those you will get error
Try like this to use date as date add
date(year('Table1'[DateField]),month('Table1'[DateField])-1,day('Table1'[DateField]))
https://www.youtube.com/watch?v=YWo-ZpKM6gU
Thank. I just tried this but it still did not work as it couldn't find the dates because they were not measures.
@system243trd , See if this can help
https://www.dropbox.com/s/bi2guw0x9awzvm2/DateAsDate%20Add.pbix?dl=0
Can you share sample data and sample output in a table format? Or a sample pbix after removing sensitive data.
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 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |