Forum Discussion
Monthly report based on user's activities
Hello All, I have the following table for users for each month:
What is the optimum approach to get the following table for creating visual charts ?
Should I append all tables to each other? Should I make the relation between each table and the date table? Should I create many date tables to make a relation with each date type column in the tables?
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.
7 Replies
- danextian
Super User
Hi koorosh ,
Assuming that the month and year relates to the dates in each column and not just a single one, I would change the data type of timestamp columns to date, create a separate dates table, create an active relationship with column C and inactive ones with the other columns and use USERELATIONSHIP in a measure to invoke the active relationship in a measure. I would have attached a sample pbix if I could copy and paste the sample data to an Excel file. Alas, it is an image.
- Ahmedx
Super User
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
- koorosh
Post Partisan
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.