Summarize/GroupBy Distinct in PowerBI - powerbi

I have a PowerBI file with CSV files as datasources. I created a table in PowerBI that summarizes the fields of a CSV file, and added a PrioirtyGrp field with Name, ID and Priority concatenated to group by.
I haven't found a way that works to group the rows of a single table by the PriorityGrp value in each row. If I have a data set such as:
I've been trying to summarize and group on the PriorityGrp field to get a resulting table of:
but no luck. What I know of SQL and VBA hasn't been much help in getting my arms around DAX, and I'm planning on doing a course, but if anyone has syntax for a Summarize, GroupBy or some other statement that could help with this, it would be much appreciated.
Thanks,
Mike

Related

Join 2 table in power bi

I need help on this issue as i don't have any experience in Power Bi. I want to join 2 table in Power Bi where it have the same column which is Part_Number. How can i make this 2 table to match by Part Number and return the value?
Recon Table
Inventory Table
I would like to have Part Number, Part Name, QTY, Total Quantity as the result. Hope that i can the clarification i need. Thanks a lot!
For this case you simply must merge the tables. It doesn't look like you have done a lot of research on the matter though, so it's hard to understand exactly what you need help with.
To merge your two tables in Power Query, I would right click in the left hand side menu and select Merge Queries as New.
After that you simply follow the on-screen instructions and select your two tables and their respective key columns. After merging you can choose to disable load of your two original tables to save space in your data model, but this depends on your requirements.
If this was my data model, I would think on why joining these tables are necessary, instead of using these two tables as fact tables, and creating a third table to handle the part number dimension with associated part metadata.
Read the docs: Merge queries in Power Query

PowerBI - Filter Table/Report based on User Selection of Slicer falls between Valid From Date & Valid To Date

I have been trying to find an answer to my problem but to no avail, so hoping someone is able to provide some ideas / advice on if this is possible and if so, how to go about it? I've tried various things and none have worked.
We create views within SQL and then connect to them using 'Import' from the Data Connectivity Mode when connecting to the SQL Server from within Power BI. Within the view, we use tables that contain a 'Valid From Date' and 'Valid To Date' for each row of data, so when a change occurs a row is closed off and a new row is created. This is so we can limit the rows of data within the table.
When trying to create a report within Power BI, we need to make it that the end user can use a data drop down list to select a date and the data within the whole of the report shows any rows that the selected date falls on or between the Valid From and Valid To dates. We use Cards, Tables, Matrix and Charts within our reports, so all would need to reflect the date selected by the user.
I have tried various methods that I could think to get it to work but each have had limitations where it either doesn't work or only partly works.
Any help / advice on this would be really appreciated.
Many Thanks
Jon

DAX - Querying Data with DAX combine data from two tables

I am new to DAX and am pulling Tabular Data from Analysis Services. There is a lot of data and I only want to pull certain columns from different tables in the cube. I can pull a couple of columns from one table but not sure how to combine it. Please see the screenshot below any help with writing this query would be appreciated.
For example, I want to see [Region] from 'Companies' and [State] from 'Houses'
You should find the fact table related to Houses and Companies tables. Lets assume it's name is Fact, then you may use SUMMARIZE to retrieve just the combinations of the columns that exists in Fact table like follows
EVALUATE
SUMMARIZE(
'Fact',
'Houses'[State],
'Companies'[Region]
)

Want to bring over many columns from another table to a table that has a column of matching values

I have two (2) tables in Power Bi and I wish to bring over several columns from a table that has a column of matching values (there are many columns that I don't need). What is the best way to do so? I tried DAX query but it only allowed for one column to bring over using the LOOKUP function. I tried to merge the queries but didn't quite understand how to get it to work as the table expanded did not match up to the values. Some help please for performing this operation would be greatly appreciated. Thank you.
Don't do it with DAX, use Power Query to merge on the key column. This can all be achieved using the menu and options, no code required. This is the same as in Excel, so here's a walkthrough from Microsoft that goes through all the steps you might need.Once you start using Power Query you won't look back. Good Luck!

Deduplication based on two column using PowerBI

Im really really new with PowerBi.
What i wanted to know whether PowerBI have this kind of capabilities,
For example:
PowerBI
As u can see in situation A, column 1 got same email (a#a) as column 3.
After dedup, it will becomes as situation B .
As i mention before, this can be done using excel but if the record very large. Excel will break.
Just wondering whether PowerBI can do this kind of deduplication.
You can achieve this by using a helper column in the Power Query Editor. Like this:
Let's make this the source table
Add a conditional column
In [Custom] select Keep
Remove the helper column [custom]