Forum Discussion
Need Help on deciding DAX
This is my data model I want to calculate sales value based on GL year 2022 and 2023, and GL period 1 to 12, INLNYR, has invoice date, sales value information, INHDYR has GL period, GL Year and ARSLSM has Sales Rep information. I dont know which DAX should I use to extract this information.
- Anonymous2 years agoNot applicable
SidraB i dont know your knowledge of dax, but all those many to many relationships are very dungerous, very hard to follow the numbers/validations. I would start by "trying" to convert most if not all things, into many to 1 relationships.
- Erokor2 years agoResolver II
This helps a ton, thanks for posting that. Some of your problems are going to come from the fact that you have Many-to-Many relationships. I suggest you to think closely about what tables need to filter other tables then implement the proper filter directions.
For example: if you never filter the INLNYR table by the INHDYR table, then switch the filtering to have INHDYR only filter the INLNYR table. Thus the FxFactors table will chain through to the INLNYR table.It appears that your INHDYR has multiple entries of GL period and GL Year (not sure what you are relating on, other than that you have a relationship). I suggest a stand-alone date table (the tool Bravo by the SQLBI.com folks can add one in pretty easily). Then relate two both fact dimensions. You'll want the unique relationships between the tables to be at the same grainularity (a good youtube search for Star Schema will help you understand this quickly).
- SidraB2 years agoNew Member
Hi Erokor, thanks for your response, based on the model I have created, can I merge the table like can I merge IN tables into one, AR tables into one, and ST tables into one in order to reduce the data load and get rid of the extra relationships I am getting, is this could be the solution?
- Erokor2 years agoResolver II
You can however, make sure that the Merge operation doesn't duplicate your data (you really have to test for this). I would worry about this working as you would expect, given the presence of the Many To Many relationships (and me not knowing what is making up the relationship keys).