Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Everyone, how are u all?
I have a bit of problem here inside my power BI. I have an Order Table, that is where is stored all of my company orders, and there is a data column and a city column.
I also created a Calendar table as an auxiliar, and connected with the data column of the order table.
My boss asked me to put inside the power BI, not only the amount of orders that has been creating each day, but also our daily amount of orders goals, that I just put manually as another table, with a date column, a city column, and the orders goals column.
I tried to connect the order goals table with the order table, but when I tried to connect 2 collumns at the same time, it just doesn't work.
It only seems to work whether I choose to connect by city ou by data, but never both.
Does anyone have an idea that can pull this off?
Thank you very much in advance!!
Solved! Go to Solution.
Hey @Anonymous ,
thanks for uploading the pbix file. Here you will find my version:
To make it work, it's necessary to delete the relationship between goals and orders:
In the Model view
I created a new layout page, that helps to focus on a certain aspect of the model. A change performed on a layout page will of course be reflected in the data model itself, next to that different layout views help to focus on a certain aspect.
Then you can create relationships like this:
Next to that, you might consider changing the filter direction of the relationships from both to single (red to green)Edit
:Edit the relationship and change the Cross filter direction:
The reasoning behind this, relationships other than 1-to-many with the Cross filter direction set to Single are considered weak relationships. Weak relationships can result in slow performance and sometimes also return unexpected results.
Hopefully, this helps.
Regards,
Tom
Hey @Anonymous ,
I recommend to create a city table, that contains the unique values from the order table and the unique values from the goals table, if you are using DAX you can use this statement:
city table =
DISTINCT(
UNION(
ALLNOBLANKROW( 'orderstable'[citycolumn] )
, ALLNOBLANKROW( 'goalstable'[citycolumn] )
)
)
Then you can use the Date Table to connect to the orders table (1-to-many) and to the goals table (1-to-many).
And use the city table to create also two one-to-many relationships.
From a star schema point of view you have a data model
Here you will find an introduction to data modeling with Power BI: https://docs.microsoft.com/en-us/learn/paths/model-power-bi/
Hopefully, this provides the information to tackle your challenge.
Regards,
Tom
Hey Tom!!
I tried, but it didn't work. I created a city table, I connected the data table with those 2 tables, but when I try to connect the city table with the two tables as well, it says that is redundant, that I need to delete some connection in order to work.
I am attaching the file down below, if want check it out I will be very happy!
Thanks Tom!
https://drive.google.com/file/d/14I86HJ3ZTdZ6RPgSxSNqvFFnqVt4GTlc/view?usp=sharing
Hey @Anonymous ,
thanks for uploading the pbix file. Here you will find my version:
To make it work, it's necessary to delete the relationship between goals and orders:
In the Model view
I created a new layout page, that helps to focus on a certain aspect of the model. A change performed on a layout page will of course be reflected in the data model itself, next to that different layout views help to focus on a certain aspect.
Then you can create relationships like this:
Next to that, you might consider changing the filter direction of the relationships from both to single (red to green)Edit
:Edit the relationship and change the Cross filter direction:
The reasoning behind this, relationships other than 1-to-many with the Cross filter direction set to Single are considered weak relationships. Weak relationships can result in slow performance and sometimes also return unexpected results.
Hopefully, this helps.
Regards,
Tom
Hey Tom! Thank you very much, you were extremly helpful!! Solution accepted!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
82 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |