Forum Discussion
How to prevent null values from loading into data model when importing data from cube with MDX query
- 7 years ago
Did you try removing Empty rows from Power Query (keeping your original MDX)?
You could simply exclude the nulls from the MDX itself:
non empty
{
(
[Promotion].[Promotion Code Name].children - [Promotion].[Promotion Code Name].&
)
} on rows
You can also do this in Power Query filter. But since you already have an MDX code, it is better to do direclty in MDX.
Thanks for the suggestion. I tried adding that to my query & running in SSMS. I get a memory error very quickly & I'm thinking its because my data source is so large?
Do you have any other suggestions?
Is there a way I can remove the rows with a power query filter? I'd prefer to "hard delete" these rows, not hide them.
Many thanks!
- AkhilAshok7 years agoSolution Sage
You can just click on the drop down besides the Product Code Name column in Power Query editor and press Remove Empty. You can consider this as 'hard delete' since null vlaues won't be loaded to your data model.
- Anonymous7 years agoNot applicable
I tried adding that to my MDX query in power bi & I got this error. Would you be able to assist?
- AkhilAshok7 years agoSolution Sage
Did you try removing Empty rows from Power Query (keeping your original MDX)?
- Anonymous7 years agoNot applicable
Yepp, that worked! So that means as my data refreshes, it will pull in everything & then filter it to non-null values?