Forum Discussion
Monthly report based on user's activities
- 2 years ago
The column name is based on the sample data you provided:
Check whether your actual data has this column or it might have been renamed. M is case sensitive - users <> Users. It is important when posting a sample data that you use the actual column names that will be in your data source. Replace "users" in the code with the correct column name.
The dates table was created in DAX. You can just use your own calendar - either import or generated using M but you'll need to rebuild the relationships and point the measures to the correct table/columns.
tell me you have one file or there will be many every month, if every month send another file from another month
and another question, do you need only the last 6 columns? as in the screenshot
https://drive.google.com/file/d/1U1l2CxUGf52ErKOuQaxbkpd3XkymsE_s/view?usp=sharing
Please, also let me know what is a better data-gathering method compared to the one seen in the Excel file.
- danextian2 years ago
Super User
Hi koorosh ,
There is lesser work to be done in the query editor if the data is one sheet but there is hardly a difference in query performance if there are only a few thousand rows. That being said, there are two queries in attached pbix - one that combines each month of data and once which just connects to a single worksheet. Note: I used December data for November by replacing dates.
- koorosh2 years ago
Post Partisan
Thanks, Dan, I got the following error:
Could you please how you created the date table? Usually, I use the following code:
- danextian2 years ago
Super User
The column name is based on the sample data you provided:
Check whether your actual data has this column or it might have been renamed. M is case sensitive - users <> Users. It is important when posting a sample data that you use the actual column names that will be in your data source. Replace "users" in the code with the correct column name.
The dates table was created in DAX. You can just use your own calendar - either import or generated using M but you'll need to rebuild the relationships and point the measures to the correct table/columns.