conditional columns
4 TopicsTaking two conditions and if both are true returning a new value
I have the following table: for which I have created two conditional columns which are as follows: Condition 1 = IF( MDD[Test 10] = "True" && MDD[Out] = "True" && MDD[Less than -10] = "True", "YES!", "") Condition 2 = IF( MDD[Test 7] = "True" && MDD[In] = "True" && MDD[Less than -10] = "True", "YES!", "") Both are text data types. I need to get a result of "PATTERN" to return based on "YES!" being in true for Condition 1 and Condition 2. As you can see, those results are true for Shaggy Rogers, however, I cannot get the return of "PATTERN". I created the column: Con1and2 = IF(MDD[Condition 1] = "YES!" && MDD[Condition 2] = "YES!", "PATTERN", "") However that doesn't work. If I change "&&" to "||" it works, but that is only based on one of the two conditions being met. I need both conditions to be met. I'm also curious why the table adds a new row for each name with every new column. I feel like that might have something to do with the problem as it may not be recognizing that the two conditional results for Shaggy Rogers are the same person. I am lost so any help is greatly appreciated.384Views0likes1CommentDAX Commands to populate a column from a piece of another column and display the counts
I want to create a visual that can be filter by priority. The priority data, unfortunaley, currently resides in the checklist title field. 1. I need to parse the priority from the checklist title into a column named "Priority". The priority column already exists in the table. 2. Add a visual (table) that displays the number of priority 0, 1, 2 and 3 checklists with percentage that are not started (0), in process (>0 and <100) and number that are complete (100). The raw data looks like this. CHECKLIST TITLE Priority Percentage completed Door inspection of EX.4.1 - Priority 1 100 Door inspection of EX.2.1 - Priority 1 0 Door inspection of SP.2350 - Priority 3 0 Door inspection of EX.33.21 50 Door inspection of 23.393IN - Priority 2 75 Step 1: I need to populate the priority column using the checklist title priority value. If the checklist title does not have a priority, I want to populate the priority field with zero. CHECKLIST TITLE Priority Percentage completed Door inspection of EX.4.1 - Priority 1 1 100 Door inspection of EX.2.1 - Priority 1 1 0 Door inspection of SP.2350 - Priority 3 3 0 Door inspection of EX.33.21 0 50 Door inspection of 23.393IN - Priority 2 2 75 In SQL, I would use an update statement and set the Priority column using a like command. How do I do this in DAX? Step 2: I want to use a visual to see how many priority 0, 1, 2 and 3 checklist have not been started, in-process and completed. The visual would display like this: Priority Not started In-Process Complete 0 0 1 0 1 1 0 1 2 0 1 0 3 1 0 0 I am on day two of trying to learn Power BI and DAX. Any help would be appriecated!Solved805Views0likes2CommentsCount Total, based on condition from other table
Hi all, I have a question. I want to counter the numbers of orders per categorie (Groups[Total amount between]). I have 2 tables. 1 table is about the sales with the total amounts per order. The other table is about the groupings. An amount of 5.50 falls in the category 5.01 - 7.50 for example. What I want is to count the number of orders per category. So how often have orders been placed in the different categories. I've been stuck for several days. I only get the total orders.... Here's my data. I have many rows. This is a small part of the data. Groupings table Key Min Max Total amount between 1 0 5 0 - 5 euro 2 5.01 7.50 5.01 - 7.50 euro 3 7.51 10 7.51 - 10.00 euro 4 10.01 12.5 10.01 - 12.50 euro 5 12.51 15 12.51 - 15.00 euro 6 15.01 17.5 15.01 - 17.50 euro Sales table: Only Total amount is relevant in this table. Key Order Amount Donation Amount Total amount .... .... .... 2.50 .... .... .... 2.50 .... .... .... 2.65 .... .... .... 5.50 .... .... .... 5.50 .... .... .... 7.81 .... .... .... 5.50 .... .... .... 8.00 .... .... .... 8.95 .... .... .... 9.00 .... .... .... 422.50 .... .... .... 424.00 What I want: Total amount between Count 0 - 5.00 3 5,01 - 7,50 3 7.51 - 10 4 ......... ......... 420.01 - 422.50 1 422.51 - 425.50 1 My measure now and what I get: Count = CALCULATE( COUNTROWS(Sales), FILTER(Groups, Sales[Total] >= Groups[Min] && Sales[Total] <= Groups[Max])) My example Power BI File: https://www.dropbox.com/s/u0b9tin0u4olb2t/PowerBiToCommunityQuestion2.pbix?dl=0 I hope someone can help me, I have a deadline today.Solved735Views0likes1CommentExcel to Dax, using sumifs formula
I'm in process of converting an excel report to Power BI. This includes matching the output of a column that has a SUMIFS formula included in the conditional statement. The columns are exactly the same in both reports, but when creating the calculated column in Power BI, I'm finding it difficult to emulate what is done with the Excel formula Excel formula: =IF([@[Shipped/CSO]]="SHIPPED",0,IF([@SOType]="SO",SUMIFS([QTY],[InvoiceDate],"="&"",[Index],"<"&[@Index],[Branch],[@Branch],[Part],[@Part]),0)) Dax formula : IF([Shipped/CSO] = "SHIPPED",0,IF(Sales[SOType] = "SO",SUMX(FILTER(Sales,Sales[InvoiceDate]=EARLIER(Sales[InvoiceDate],1)&& Sales[Branch]=EARLIER(Sales[Branch],1) && Sales[Part] = EARLIER(Sales[Part],1)),Sales[QTY]),0)) I am willing to provide an example of the table information, but the Sales table has exactly the same information. Thanks for the help!Solved1.2KViews0likes2Comments