Forum Discussion
MATRIX GrandTotal calculation with TOPN multiples dimensions in same column (measure)
Hi Lydia,
Here's the link to the excel file with sample data an all explanations to the issue.
Thanks in advance.
Jose Pintor
Jose
You need to post a PBIX file that contains the problem, otherwise those that are trying to help you have to first rebuild the workbook to re-create the problem. Please post a sample PBIX that generates the problem as you have described.
- JosePintor7 years agoFrequent Visitor
Hi Matt,
Thanks for your time,
Here's the link for thr PBIX file (all explanations are inside the model).
https://www.dropbox.com/s/4xgcpk3g694z1tn/Test.pbix?dl=0
Best Regards
José Pintor
- MattAllington7 years ago
Community Champion
Hi Jose
I know you are trying hard to get help here, but I can't really start to help you with your DAX issues with the data model you have got. This is the main model (for the benefit of others reading along)
In addtion there are 15 other tables that are not joined to the main model (not shown above to save space).This is not a good design for Power BI and looks to me like you have just loaded what is in your ERP system. This is not what you should be doing. Some questions I have for you:
- why do you have a many to many relationship between RLSAplicacao and Movimentos?
- and also between TKPIMestreV and TKPIMestre?
- what is the purpose of the inactive relationship between CalendBase and TKPIObjMensal?
- what is the purpose of the 15 tables not joined to the main model?
- there are around 175 columns in the Movimentos. What is the purpose of each of these columns in your report?
If you don't know the answers to these questions, then you haven't completed the first part of the data modelling process.
The way you should start the process is to look at the data table you need (presumably Movements in this case) and start from there.
- The purpose of columns in the data table are either to show transacitonal information or to provide a unique ID to a dimension (Lookup table)
- The purpose of lookup tables is to provide more information about each transaction using the unique ID column
- The purpose of relationships in Power BI is to propagate filters between the lookup tables and the data tables
Frankly I suggest you start again.
- Read my article about how to load and structure tables in Power BI
- Start with the movements table and think about what you want to report on. Load just the columns you need in the report
- Ask youself "who, what, when, where" about each transaction in the table (these are the dimensions - there may be more)
- Make sure there is an ID column that uniquely identifies "who, what, when, where"
- Load a look up table for each ID column. Where possible consolidate other source tables into a single lookup table for each dimension
The bottom line is a Power BI reporting database is not the same as a transactional database. If you simply load your transactional tables into Power BI you will be in for a world of pain.
Sorry to be the bearer of bad news.
Matt- JosePintor7 years agoFrequent Visitor
Hi Matt,
Thanks for your answer.
I have wrote a detail text in the last hour answering to all your questions, but when i was posting it, the browser breaked and gave me an error and i lost all the text :smileysad:.
if you really need it i you explain all in detail tomorrow... (here is midnight...)
But i (re)publish the same model (same link) with only 6 tables (3 are parameters tables) and now i think it's easy for you to take a look into this issue.
Let me now please.
José Pintor