Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All
I have create a measure below work fine :-
When i try to create a rolling profit i get error :-
It cannot detect SALES[PROFIT]
May i know why ?
Paul
Solved! Go to Solution.
@Anonymous
Try to delete SUM('Sales' from before profit. Profit is a measure so you don't need to sum it again.
Rolling 12 Month = CALCULATE([Profit], DATESINPERIOD( ...
continue the rest of your measure as is.
DAX best practice naming convention says:
1) When referring to COLUMN - put table name in front: Table[Column]
2) When referring to MEASURE - do NOT put table name in front: [Measure]
This is good practice to follow, as measures do not belong to a table. They must be unique across the entire data model. It is also possible to change the 'home table' of a measure. Finally, DAX gurus expect this naming convention, so it's easier for us to read your code if you follow it.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @Anonymous , has this problem been solved? If so, kindly accept the proper reply as the solution. More people will benefit from it. Otherwise if you are still confused about it, please provide more details about your problem. Thanks a lot.
Best Regards,
Community Support Team _ Jing Zhang
@Anonymous @AllisonKennedy provided the correct solution. Also when you are referring to Measures in your calculations, don't use a Table name with the measure. Measures are global to your model and as a best practice, don't use table names when using measures in another measure.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous , to me profit seem like a measure. If it is a measure sum will not work. Sumx Can
calculate(Sumx(Table, [Profit]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
Or simply measure
calculate( [Profit],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
@Anonymous
Try to delete SUM('Sales' from before profit. Profit is a measure so you don't need to sum it again.
Rolling 12 Month = CALCULATE([Profit], DATESINPERIOD( ...
continue the rest of your measure as is.
DAX best practice naming convention says:
1) When referring to COLUMN - put table name in front: Table[Column]
2) When referring to MEASURE - do NOT put table name in front: [Measure]
This is good practice to follow, as measures do not belong to a table. They must be unique across the entire data model. It is also possible to change the 'home table' of a measure. Finally, DAX gurus expect this naming convention, so it's easier for us to read your code if you follow it.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 49 | |
| 44 |