PowerBI Table and Matrix Totals/SubTotals Not Summing Properly - powerbi

I'm doing some very basic aggregations and this is the issue I'm facing,
The total simply doesn't add up to what it's supposed to be. Is this a table relationship issue or something else?
That total makes sense without any filters applied.

What might have happened is that the relationship was only filtered in one direction. To fix this, follow these steps:
Click through to the Home tab > Manage Relationships
Click on the relationship describing Spend to the filtered table causing the problem
Click on Edit...
Ensure the Cross filter direction drop-down is set to Both
Hopefully that works for you!

Managed to figure this out by looking at the data in on a very detailed level. Turns out the relationships are fine, it was just a matter of bad data that caused the relationships to be wonky and bring in other values.

Related

Power Bi Can't create relationship between tables even relationship is possible

I've these four tables "Central, east, west and south" and I want to build relationship but, I was not to able build. I'm getting error what does it mean? Can anyone tell me how to resolve it? Even I clicked on "Autodetect" Relationships then it says - "There are no relationships found" Please help. But, relationship is possible after doing drag and drop I got an error. Clearly we can see that the relationship is possible
This error show what does it many how can overcome with this problem
Chances are you are not using data relationships in Power BI as they are intended to be used. It's tough to say without seeing your data, but I would guess you actually want to append your central, east, west, and south tables into one table in power query editor. You can also add an additional column to track which table or superstore each row originally comes from.
Here are some resources to help
Star Schema
Append Queries
Add a Custom Column

Difficulty with relationships creation in Power BI

Hello friends,
I have a difficulty creating relationships in Power BI. I thought I created them properly, but when I create visualizations i clearly understand smth is wrong.
I will greatly appreciate if someone may give me an idea where I am wrong.
The most important thing in relationships of PowerBI is that inactive relationships (the dotted line) has no effect on measures and calculation. So they can be removed (however,they can be used in measures with USERELATIONSHIP in DAX thus maintaining them is beneficiary).
Avoid many-many relationship that cause confusion. In your case, I believe the "last ship date" table relation with both 'Locations/Dimensions' and 'Move Type' has brought confusion.

PowerBI Troubleshooting Measure Error 'Column doesn't exist or doesn't have a relationship...'

I've been working in a practice PowerBI document and was able to get a measure to work, but now when I try to re-create the measure in the non-practice document, I get this error:
'The column 'Department Names[DESL]' either doesn't exist or doesn't have a relationship to any table available in the current context.'
The data and tables are exactly the same for both files.
I've compared the relationship in the model view and the relationship is the same.
Where else can I troubleshoot to figure out why the measure doesn't work? I feel like PowerBI did something automatically in my practice document that I need to implement.
Also, any great training suggestions would be swell.
I found a problem with my database connection, which would have been nice if PowerBI had told me directly, instead of only throwing an error when I tried to connect the 2 sources.
I'm not done fixing the problem yet, but suspect that once that connection is good, I'll be able to relate the 2 columns in the 2 tables.

Delete unused measures in Power Bi

I have to take charge of power bi's reports and there are really a lot of measures. Many of them are test measures that are useless and I would like to delete all unused measures. Is there a method to do this easily or should each page of the report be reviewed for each measure if it is used?
Radacad has created a power bi cleanup tool. This should do what you require.
PowerBI Helper
Radcad's tool is good, but it won't actually let you delete the measures. It shows you the tables that aren't used in the visualizations so you can hide them. But I can't find a way to see any unused measures, much less delete them.
Go to Model view -> under Fields, select multiple measures to be deleted by holding CTRL/Shift key, press delete button. I encountered the same issue and resolved it by changing the view in Power Bi. I hope this is applicable on your end too.
I found this online... it looks like it might be a useful hack.
With the option Enter Data, you can quickly create a new empty table to place your test measures.
After testing, move the correct measures to a final table and remove the test table with all other measures.
https://community.powerbi.com/t5/Desktop/Best-way-to-delete-multiple-measures-in-tables/td-p/415716
This feature is already available in the model view.
If you go to the model view, by clicking on expand button for the data table where you want to delete a group of measures the list of all columns and measures will be displayed. Then you can use CTRL or shift buttons to select multiple measures. After the desired selection, by right clicking over it you have an option "Delete from model" to delete the selected measures at once.
Hope this solves your problem.

Get "not allowed for columns on the one side of a many-to-one relationship" errors

i have created Power bi project, It is working fine in the beginning but when i refresh my datasource , i get this error " not allowed for columns on the one side of a many-to-one relationship" . Any can help me ??
I resolved this issue by going into the relationship, right clicking to view properties,
and making it a Many to One Relationship.
Power BI sometimes automatically creates relationships between the queries that are being used to drive the data in the reports. When I have encountered this error or errors like it in the past I:
Go into Manage Relationships
Verify that there is a relationship listed
Evaluate the From and To relationships that are listed as active
Delete any invalid From and To relationships between separate data sets
My most common issue in the past has been that I will have two very different queries pulling data from separate sources with similar column names and Power BI will generate a relationship between them that is invalid. After removing the relationship it has always resolved my issue.
In my case issue was related to the fact that Power BI was threating "SQL View" as a "Table" and as a result it was creating relations for it.
Although I've checked the "Manage Relationships":
and removed one relation which was not reasonable the issue was still persisting.
Then issue solved when I had looked in the "Relations"
tab and found unreasonable relations related to my View and removed them.
None of these answers helped me. For me I received this error when trying to refresh my dataset which had previously worked for some time. After investigating I found the schema of the source database had changed. Two fields that previously didn't allow nulls now allowed nulls and had null values for some rows. My Power BI model still expected these fields not to contain nulls but was throwing this same and very misleading error:
Data source error: Column 'x' in Table 'y' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table. Table: y.
Initially on seeing this error and opening up my report in PowerBI Desktop and going to Modeling > Manage relationships. I looked for a relationship on table y for column x, but no such relationship existed!? Was I confused? You bet.
After investigating further I discovered the database schema change and resolved by updating my Power BI model by going to the data model editor, expanding table y in the Fields panel on the right hand side, selected field x, expanded "Advanced" in the Properties panel and changed "Is nullable" from No to Yes. I then applied the changes, saved the report and refreshed the dataset.
I followed these steps
Step 1: Go to the Model section from the left side of the Power BI Desktop
Step 2: Delete all the relationships (or connections) amongst the tables that have been created by Power BI itself while you were working with the Power Query Editor
Step 3: Click 'Refresh visual and data' option in Home (besides the Transform Data button)
It worked and loaded the new data and also applied the automations done in the query editor.
I got this error on a completely new table made in Power Query, weird since I had no chance to create a relation yet.
Easy fix: Apply a filter that removes all blanks on that column - apply the filter, and then delete this new filter again
Another problem you might have is that "Autodetect new relationships" is turned on:
This is a setting that disables auto-detecting relations under "File/Options & settings/Options/Current File/Data Load/Relationship/Autodetect new relationships after data is loaded"
I had the same issue, after spending hours of searching for a fix and not finding anything, I started scratching around and found the problem took 1second to fix. My issue specifically, was a an additional relationship created within the model. The connection showed up as a "dotted" line one of my tables. I deleted the relationship, refreshed. Done.
This happens when your table or connected tables in excel, contain blank row, for resolving this issue you will need to click anywhere in the excel table, then click on the table tools, then resize table and Select the entire range of cells to include all rows, make sure no blank rows are included then save and get back to your PowerBI then again refresh it, all will work.