Missing values in PowerBI slicer - powerbi

I have a problem in my cube with a dimension value as a slicer or a filter. It has no and name and I want to slice on name, but some of the values are missing. It is the same problem if I use no. If I use no as a filter and use advanced filter to search for the specific no the data works, but the slicer for name is still empty. The strange thing is that I can see the no and name fine in the data area, just not in the filter or if I use a slicer.
I have the same problem in PowerBI desktop and in the online version.
Edited:
I have several facts using the same dimensions. I have found that a disabling a specific relationship from a fact one of the dimensions makes the problem disappear. The number of values in the slicer are a bit too many, but at least now it doesn't exclude some of the values I can see. The only problem is that I need the relationship. I have checked if there should be a problem with the values for the relationship such as missing or null values, all the values are there.

My colleague found the solution for my dashboard: when you go to the options of the X axis there is a Start and End box. In my End box there was a number, which caused the last value to disappear. When I removed this number (and Auto appeared), my graph was complete again.

Removing and adding the problematic fact table again solved the problem.
It was quite hard to find out what was causing the problem to begin with. I went about it by first creating a minimal cube to make sure that the core data was correct. After verifying that, I opened the problematic cube and starting removing facts and dimensions until the problem disappeared.

Related

How to deal with numeric attribute in dimension?

I have a model where in my Project dimension, I have an attribute (AgreedReturn), which is a fixed number.
I included it in my model, all good.
My problem now, is that I have a requirement where users want a SUM of that attribute.
This is very confusing to me... For me, it clearly belongs to the dimension, but, it messes it up that they want ‘math’ applied on it.
What is the right modeling approach to this? Am I forced to move this attribute to the fact somehow?
Numbers in dimensions are not problematic. Including them in calculations is not problematic. For example a Product may have a weight, which you could multiply by a quantity from a fact table to produce a shipment weight.
So your problem is just one of understanding what the users are trying to measure, and figuring out how to calculate it.
And it may well be that it's more convenient to push this attribute to the fact table during ETL, or with a calculated column. But that's a secondary issue.

Cant create a connection due to duplicate values

I have a problem, where I can't create a connection between two columns of two tables. It says one of the columns should have unique values. It should, I made sure I queried distinct values. I trimmed the data, I also changed everything to lowercase. I even went ahead and used remove duplicates in PowerQuery (when I selected all the columns and even on the single column).
The problem still exists and I can't create a connection.
Does anyone have any tips?
Ok, so I'm ashamed to say this, but I spent 6 hours on this today. And then I realised the message might just be wrong and there is something else going on. There was a row where the value was null, so "". That caused the problem. And it wasn't even duplicated. And removing the blanks in PowerQuery didn't work either.
So I removed the "" directly in the query and now everything works as it should.

"sequence contains no matching element" on Group By operations in Power Query

Power BI newbie question here.
Whenever I add a Group By step with a Text.Combine() or a Max() aggregate, applying changes or refreshing data results in the aforementioned exception.
My datasource is a D365 dataverse connection, all queries run just fine until I add a step to group and aggregate. As an example, starting with a very simple query with 2 columns (demandId, kor_subcontractorbillnumber) I want to concatenate in a csv column all billNumbers related to a given demandId :
= Table.Group(#"Table Buffer", {"demandId"}, {{"BillNumbers", each Text.Combine([kor_subcontractorbillnumber],", "), type nullable text}})
As seen in the attached screenshot, the preview on screen seems correct : the expected result is displayed in the BillNumbers column, and no error is reported in the column quality indicators. All is fine...until I click Apply, which raises the exception.
I tried to clean the columns as much as possible before grouping (removing empty values, errors, duplicates, etc.), as well as adding an extra step to store results in a table buffer before grouping but with no luck.
Browsing through SO I found that similar issues could be related to :
Wrong relationship cardinalities : does not apply here I guess since everything is correct in the buffer table until I group
Power Bi Desktop update : some users have reported in the past that an update broke something and gave the same exception. In my case, the issue started occurring after upgrading to July 2022 version and unfortunately it seems I can't downgrade to a previous version. I've started using PowerBi in June and do not have much experience to detect whether the july update actually broke something, though some reports ceased functioning short time after the update.
Even stranger : If I remove the last step (Group By) and I create a new query referencing this one... I can add a Group By step and apply my changes...until I Refresh my report : at this point all the embedded queries fail with the same exception, even those absolutely unrelated with my changes.
Could anyone explain me what I'm doing wrong or if you have experienced the same behavior with the last version of Power Bi desktop ( 2.107.841.0 64-bit), which could point me to the right direction ?
Thanks for your help !
After many tries, I eventually stumbled upon a workaround: instead of the Group By step, I clicked on the very last step of my query and selected 'Extract Previous'. This created a new query (result of all previous steps), and I was able to perform my Group By on this new query without any errors.
I have no idea how this is different from adding the Group By at the end of the first query... but the exception is gone. Kind of a code smell anyway...I mark my own question as answered in case it can help someone, but I'd more than happy if someone could shed some light on the underlying reason of this issue.

POWERBI: take while table when there is no available relation

I have a slight issue with my tables in POWERBI. In short, I have a missing link in one of my relations. As a result, instead of returning NOTHING which is logical and actually what I would like, it returns EVERYTHING.
A bit more details, I have the multiple tables with relations between them. The problem is that I have a few task_group pointing toward shipments that do not exist. In my visualization, I am trying to access data (a count of the number of Packages linked to a shipment) that is linked to a shipment. The logical thing for me would be that "If there is no shipment fitting the number that is given in the shipment table, then you cannot count the number of packages linked to that shipment".
But PowerBI beg to differ. His idea is "If I cannot find a shipment to link to package, i'm going to take every single package regardless of shipment". As a result, a group of task that do not have any package end up showing as having all the packages instead. How can I tell powerbi to return nothing if he doesn't find anything instead of returning everything?
Image of my relationships
I think Power BI behaves slightly unintuitively where there are nulls on one side of a join.
Have you tried filtering to only include where shipment_id is not blank?
If the problem is you having NULLs in one side of the relationship, the best way to tackle this would be to replace the NULLs with something else. Now, you can do it in two ways:
Edit the Shipment number NULLs to something else in the Power query while importing (Some number which is not likely to be an actual shipment, maybe 0)
Create a calculated field in DAX replacing the blanks/NULLs and use that in the relationship instead
But I think you may have NULLs in both the sides of the relationship. That is the only explanation I can think of, why Power BI is behaving this way. Either way, the above solutions should fix it.

Filled Maps in Power BI not working (despite normal maps working!!)

would like to thank you advance.
New to Power BI but have found that filled Maps does not working despite working on same data with normal Maps.
I am trying to produce a filled map using US States (full state name used).
Could this be a bug with Power BI (as this seems very intuitive for it not to work) or am I missing something?
Screenshots below:
1. Screenshot shows that Maps is working and is picking up on the State names.
Screenshot shows when chart type is switched to Filled Maps, State data is not represented as a filled map.
Hi Simon were you ever able to get the filled maps working? If so do you care to share what you did? I have attempted and am not able to get it to work.
Take a look at this post.
Things to try:
Provide some measure or value to the Color saturation field of your filled map visualisation.
Set the data category of your State property to State/Province (Modelling tab)
Change your state names to use geo location terms, e.g. Washington->Washington, DC.
Include country name: Southampton->Southampton, England.
Specify latitude/longitude as well as above.