I would like to merge 2 tables, Table3 and Table5 in Power BI.
Table3 is imported and Table5 was manually built in Power BI, as shown below:
I tried to use "Merge Query" feature in Power BI Desktop, with left join on Table3.Column1 and Table5.Name. I would expect to see the Table5 as highlighted in red, but instead there is only one option of Table3. How could I merge these 2 tables?
Table 5 is a calculated table and so cannot be merged in PQ. It has been derived from your model after PQ loads it. Create your table in PQ if you want to be able to merge it.
You can enter the values in Power Query by using Enter Data command, To see where to find it , check the picture.
Then create your table by manually entering values:
Then You can see the Table5 in Merge Dialog Box, see picture
Then: Combine (Merge) Tables
The result It returns:
Related
Actually, I do not know, whether there are any tools to do it in Power BI. Could you help me, please?
I have two tables (Table 1 and Table 2), which have the same number of columns, moreover, Table 2 is filtered version of Table 1, which was created in Power BI. I have already created analytical page with different graphs for Table 1. However, I need to have the same graphs for Table 2.
Is there any list to add to this page with two options: Table 1 and Table 2? When I will need Table 2, I will choose it and all graphs will be created using this table. Is it possible?
Thank you in advance!
You can achieve what you want using bookmarks. Create a button linked to the bookmark to show and hide visuals as you desire.
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks?tabs=powerbi-desktop
I am a PowerBi beginner and would like to know if it is possible to create a table report that behaves like explained in the attached picture (according to the fact table I have).
I tried to do it with a DAX measure using the following formulas but it does not work as I wish :
CALCULATE(SUM('Fact'[Invoice]),'Fact'[Customer] = SELECTEDVALUE('Fact'[Customer]))
CALCULATE(SUMX('Fact','Fact'[Invoice]),'Fact'[Customer]=SELECTEDVALUE('Fact'[Customer]))
The slicer does not filter the table in order to get all the product in the table even if the customer did not buy one.
Is it possible to do it ?
Many thanks
I am loading an Excel file, in which it has 43 rows, all the rows are identical. This is the only file I'm loading and there are no connections relationships in the model whatsoever.
When I plot my data into a table visual, and choose not to summarize any of my fields, Power BI still shows me one row. While if I change any of the field to do a count of it, it shows me correctly that I have 43 rows. I need to be able to see all the 43 rows in my table.
Why is Power BI summarizing my data even if I command it not to do so?
Am I missing something simple?
Input table as seen in Power BI data tab:
The visual I'm trying to create:
The table visual in Power BI behaves similar to a Pivot Table in Excel.
W/o an aggregation defined, the "Values" fields behave like "Rows" in a Pivot Table and you will only see distinct items or distinct item combinations. You have 43 identical records, hence it is represented as one row in the visual.
With an aggregation defined (Sum, Count, ...) the field behaves like "Values" in a Pivot Table, and you get the result of that aggregation, filtered by the distinct items/combinations to the left, which is again one row in your case.
If you just want to show all the records in a table visual, you'll have to make them unique. The easiest way to achieve that is by adding an index column in PowerQuery and then also showing that index in the table visual.
However, this is not exactly what Power BI is made for and you are probably better off by switching to something like PowerPoint instead.
And btw., newer show sceenshots in stackoverflow, always provide sample data instead.
We create a monthly report in Power BI which requires creating multiple new tables, columns and measures from the data we import. Currently, the instructions for creating these tables is done manually, where we click on the new table or new column or new measure button and paste in the DAX code for that individual item.
I am a DAX newbie and was hoping to streamline the process. Can we create a multiple line DAX code that will create the tables as well as the measures and columns (in the correct table) that we only have to enter once?
Here is what I am asking for in psuedo-code:
Create Table A
Create Column 1 in Table B
Create Column 2 in Table B
Create Measure X in Table B
...
Create Measure Z in Table B
Create Table C
My scenario is this: SalesValue have been entered for multiple sessions namely Lunch, Breakfast, dinner which is grouped by SessionKey in numbers. The same SalesValue repeats at times for 2 or more sessions for a given production plan date, based on MenuKey, RawMaterialKey and IngSFKey.
I need to use DAX query in Power BI to remove duplicated SalesValue based on ProductionPlanDate and SessionKey for a particular MenuKey in a given date.
I have attached the screenshot of a sample value range of SalesValue containing duplicate values for the same date across different sessions for your reference. For example, rows 7 and 14 have the same ProductionPlanDate, SessionKey, MenuKey, and SalesValue.
So you have a table with one "Grain" and you want to change the "Grain" by using a subset of the columns. Specifically you want only rows with distinct columns ProductionPlanDate, SessionKey, MenuKey and SalesValue
To do this in a DAX query you would use
evaluate
summarize
( 'table name'
, 'table name'[ProductionPlanDate]
, 'table name'[SessionKey]
, 'table name'[MenuKey]
, 'table name'[SalesValue]
)
You could provide this to create a calculated table or provide it to each measure that needs to work with this coarser grained data set.
However as it seems you are in Power BI the more appropriate place to do this would be to create your coarser grained table using Power Query (via the Edit Queries section of Power BI).
This is better than doing it in DAX as DAX is more tuned to analytics where Power Query is tuned to data transformation - and you want to do data transformation.
You can either keep the table that you have now alongside the new modified or replace it accordingly.
option A will just change your incoming table to have the new coarse grain.
option B will keep your original table and have the new grained table alongside it. Note that this will mean any Power BI visuals that you have created will need to be "rewired" to use the new table.
To do the transform in Power Query, the steps for both options are
Go to the Edit Queries area on PowerBI
Select the columns that you want to create the new Grain (i.e. ProductionPlanDate, SessionKey, MenuKey and SalesValue) by holding ctrl and clicking the column headers of each column in turn.
Right click on the column header for one of the selected columns and select "Remove Duplicates"
If you want option B, simply first copy the existing table by using "Reference" then do the same thing as follows:
Find your existing table on the left Queries section, r-click and click Reference
Rename the new table something appropriate
Apply the transform steps to the new table as above
Click Close & Apply and rewire any existing visuals that you need to use the new table
If you find you don't need your old table you can R-click on it in Power Query again and uncheck "Enable Load" so that PowerBI will not see it anymore.