PowerBI importing data - blanks being autopopulated - powerbi

In an SQL database, a column (EXTENSION) has blanks, however, when the data is imported into PowerBI, some blanks get filled with the data of the previous cell.
SQL
PowerBI
However, in the row view, I can see the field (EXTENSION) is empty
How can I avoid PowerBI autofill the values when the field is blank?

Related

How can i store data of database's different categories

I want to export data into CSV format, i have this tables they have data about customers and products.
I want to export table to CSV for all products. In CSV format it should be like table below. First row is customer id and column under every customer id is prices of products that customer bought.
The question is how can i store data of prices by user and product. I tryed to use queries and arrays, but there can be any amount of customers and products.
To export to CSV i store all data in QString value with ';' for next column and \n for next row and then transimt QString value.
Solved by creating QTableWidget. I transmited data from database in QTableWidget one query in a column and then row by row added data from QTableWidget to QString value to export it later to CSV.

Create Rows to the table where the data is missing for specific dates in power BI

I have a table with below columns in my dataset. We have monthly revenue for each resellers in this table.
For few resellers, there will be no data for some particular months, as they didn’t generate revenue on those months. I want to create rows for those resellers with the missing date and the revenue for those missing dates to be updated as blank.
Please advise how we can achieve this.
Current data:
Expected result:
For the missing dates you need to create a date table using the CALENDAR function like this:
Date table = CALENDAR(MIN(Date), MAX(Date))
This will create a table with a single colmn containing all the dates in your table with filled gaps (even if you don't have certain dates in your table). Then you need to create a relationship between your table and the date table.
When you use the date and the revenue in a visual lets say table or matrix all dates will be visible but the revenues will be blank (except for those that actually had a value in revenue).

PowerBI repeat rows from table A for each date in table B

I have two tables one contains User data and other is my dates table.
Is it possible to copy each row from users table for each date from dates table like below?
It is possible using transformations:
Add custom column(column formula is second table name):
Expand column:

Slicer Only Show Month / Year and Filter On That

I have a table with a value ReportDate, which is in the format '03/01/2020'. I want to create a slicer in my Power BI report that displays only the format '03/2020' and the user can then select the value of the month and year to display, and it will display the data for that month (regardless of the day value). How would one go about doing this? I know technically I can add a new column in the database table, but unfortunately I do not have access to changes in the database and as such, would like a Power BI solution.
In the Power Query Editor create a new column with formula
Date.ToText([Date], "MM") & "/" & Date.ToText([Date], "yyyy")
Change [Date] to whatever your date column is called. Date.ToText converts a date time to text, which is then concatenated. You can then filter on that column. For issues like this it is best to have some sort of calendar table.
You can create a new column in using query editor in power bi:
mon_year = left(<column_name>, 3) & Right(<column_name>, 4)
Note: Make sure your are connected to dataset in import mode because in live connection you will not be able to create New Column in Power BI.

Create table comparing Two Queries with identical fields/field names

I would like to create a table to compare Month To Date (MTD) Vs YTD Sales data metrics
I am using two queries:
1st query = YTD Sales data (Two fields: Sales and Quotes)
2nd query = MTD Sales Data (Two Fields: Sales and Quotes).
Each query has the same field names, just different data
I would like to output a table like the following
How to I create the above table? At the moment I can only create a table like the following:
The latter 1x4 table only works if I appropriately name the fields. But definitely isn’t what I want, because with enough fields, the table could go on forever.
Any help would be appreciated
In the query editor, create a label column for each table that labels what they are and then append the two tables together so you get something like this:
Then you can create a matrix visual with the Label column in the Columns field and the Sales and Quantity columns in the Values area.
Make sure you've switched "Show on Rows" to "On" under the Format > Values section of the Visualizations pane.