groupings
8 TopicsCheck if rows contain a string value against an unrelated table
Hi, I have two tables in my dataset: Table1 is my transactions which have a description that looks like this: and Table2 is my legend table, where I define what each transaction belong to what category: My goal is to categorize each transaction based on the legend by looking for a piece of description column in the transaction column. So if a transaction contains "Desk", the column I'm going to create shows "Office Supplies". Here is what I've tried: I used a new custom column in Table 1 to check for 3 values and return true if they returned a value: List.Transform ( {"Desk", "Payroll", "Chair"}, (substring) => Text.Contains([Description], substring)) This returns a list of TRUE or FALSE based on the three examples I gave it. Potentially this can be used to get the first row that returns true and use that as a reference for the second column? I tried to do it in Excel, and essentially I had to use SEARCH fonction with INDEX and MATCH to get the category from a different table. My issue is that I have two tables that are not related and I'm not sure how to do a search for a piece of string for every row. I'm pretty new to PowerBI and I need some support please. TIA!Solved2.6KViews0likes4CommentsDAX increate a column grouping for a column and providing the data for other
I am trying to create a new column in DAX that will give the result of the column Status for the type “Chain” with records with the same ID. For example, for this table Name Type ID Status a Chain 21 Open b Job 21 Closed c Job 21 Closed d Job 21 Open e Chain 22 Closed f Job 22 Closed g Job 22 Closed h Job 22 Closed The result will be Name Type ID Status NewChain Status a Chain 21 Open Open b Job 21 Closed Open c Job 21 Closed Open d Job 21 Open Open e Chain 22 Closed Closed f Job 22 Closed Closed g Job 22 Closed Closed h Job 22 Closed Closed Can you help me?Solved547Views0likes2CommentsCount of results in measure with DAX
Hello!! I have a table of users an access to an app like this: Access User Date True A 01/06/2022 True A 01/06/2022 True B 01/06/2022 True A 02/06/2022 True B 02/06/2022 True A 03/06/2022 True C 03/06/2022 True C 03/06/2022 True D 03/06/2022 I would like to count how many users has accesed the app X times, the result here should be: Num of users accesing X times X 1 1 2 2 0 3 1 4 Desirably dinamically with DAX, since I want the results to change depending on slicers.Solved644Views0likes2CommentsGroup each person only to one group
Hi all I have this problem where I am trying to group together all the names which have the "I" marker and put them only in group X, and the other names that dont have the market "I" go in group Y. I have been trying out different version of IF statements, Textcontains etc. but what happens then is that I always group for example name A in both group X and Y, when I only want to have it in group X This is an example of my data, each person always has more than one marker per day so if I try something like if(name="I";"X";"Y") Person A goes into both group X and Y Name Marker Date A I 8.3.2022 A IN 8.3.2022 A 8 8.3.2022 B IN 8.3.2022 B 8 8.3.2022 C I 9.3.2022 C 9 9.3.2022 C F 9.3.2022 D I 9.3.2022 D 9 9.3.2022 D F 9.3.2022 Here is an example of my desired output Name Date Group A 8.3.2022 X B 8.3.2022 X C 9.3.2022 Y D 9.3.2022 Y Best regardsSolved1.2KViews0likes5CommentsRank orders by value with multiple lines per order
Hello community, hope you can help me out ... I've been trying to create a ranking of sales orders where some of them can have multiple line in the fact table since a given order can contain multiple products. I have a really simple model, a fact table SalesOrders with two dimensions Date and Products, and two disconnected tables one for measures and one for rank grouping: This is what my fact table looks like: Then I created the following measures: (credit to Enterprise DNA since I took this formula from them ... ) As a result of the measures above, I get the following working correctly: So far so good ... the problem is what I want to add Products into the table or matrix and still see how the orders rank. As you can see in the table below, it is my DAX formula is ranking the orders within each product category / name: All that said, I really don't know how to modify my measure to have the ranking be like in the first set of tables but still show the product level data in the table... expecting something like this: The top 3 orders continue to be 10, 9 and 5, but I'm now showing the products each has with their values. Hope the explanation of my problem and what I've done so far was clear. I'm also adding the pbix file for this example. Sample pbix file I really appreciate any help you can provide. Thanks EstebanSolved3.2KViews0likes10CommentsGroup table in terms of date column and specific value of another column
Hello all, I have a problem which sounds so easy but as I'm a newbie I can't manage it and need your expertise to help me please: As a sample you can have a look at the table below: I need to remove all the rows which have not Main Category value on their date (in this example I should remove rows 9,10,11), The main category value here is the beginning point for my process per day and if it does not exist in a day, I should remove all the other records on that specific date or ignore them could you please let me know how can I make a DAX code or M-query to fix it? as my data are thousands or millions, needs to have the fastest one. Many thanksSolved2.2KViews0likes7CommentsPercentage of a group
Hi, I feel like this might be a little more straight forward than I think and I'm overthinking it. I have a data set that looks something like this: Program application # met standard binary A 1 1 B 2 0 B 3 1 B 4 0 C 5 1 C 6 1 C 7 0 D 8 1 What I am looking for is the percentage of programs that are meeting the standard. So if I were to calculate for the above, 75% of programs are meeting the standard, programs A, C and D are meeting the standard. I believe it's a calculation but I can't figure it out Any help that can be provided would be appreciated. Thanks in advance, Vanlang1.2KViews0likes4CommentsGroup values together based on field value and create new combined value
Hi looking for a way to do this without creating a separate Table or a calculated Column. But looking for way to create a Measure that would combine a Sales Category for only certain Customers into a new combined value. See below, Lets lets say Customer Bill Gates has sales in multiple Sales Category and I'm looking to create a Measure that says" If Customer="Bill Gates" then combine Sales Category, else show Sales Category. So looking for 1. Ability to statically enter Certain\multiple Customers to apply this to 2. Ability to statically list certain\multiple Sales Categories that I want to combine and the other Sales category will just be listed as normal. 3. Name this new comobined value any name that I want. Anyone have any ideas on how to do this with a measure? See example below. Before results: Customer Sales Category Sales$ Bill Gates Software 1,000 Bill Gates Hardware 500 Bill Gates Internet 200 Bill Nine Science 200 Tiger Woods Golf 99999 Tiger Woods Promo 5 Expected Results: ( I would put in the Measure 2 things, Customer Name = "Bill Gates", and Sales Category to combine = "Software" and "Hardware" ) and have the new Combined Value be called "Combined" Customer Sales Category Sales$ Bill Gates Combined 1,500 Bill Gates Internet 200 Bill Nine Science 200 Tiger Woods Golf 99999 Tiger Woods Promo 53.9KViews0likes10Comments