contains
16 TopicsCountRows where column A contains a string and column B = a string.
I have been driving myself crazy with this, and I've looked around and asked colleagues and I can't seem to get there. I am used to Power Apps syntax, but not DAX so I really need some help. I have a table with many columns, two of which are important for a measure I am trying to create: Table = Project Overview Column 1 = Project Name Column 2 = CP I need to get the number of rows where: Project Name contains "Mission" AND CP = "Missing CP" I got this far: calculate( COUNT( 'Project Overview'[Project Name] ), CONTAINSSTRING('Project Overview'[Project Name],"Mission")) But I can't figure out how to add a second condition in my filter. Can anyone help?4.9KViews0likes7Commentscontains a value
Hello all I am new to DAX and learning thing as I go. I am creating a measure where I wish to give me a count of issues based on certain criteria Open Issues Platform = CALCULATE(COUNTROWS('Jira-Extract-Live'), 'Jira-Extract-Live'[All Labels]="Platform" What I have now found is that my All Labels column contains other values and hence is not matching so my question is (and apolgise if really simply) can the = be substituted to represent 'contains'? So my query would be the same but the ask on the All Labels column would be contains "Platform"? Thanks JSolved1KViews0likes2CommentsSales orders that contain apples Y/N
Hi, What is the column or measure formula to generate the Y or N in the 'Does the order contain apples' column? Using a DirectQuery model. OrderID Item Does the order contain apples? 001 Apples Y 001 Brocolli Y 002 Pears Y 002 Apples Y 002 Bananas Y 003 Bananas N 003 Pears N 004 Apples Y Thanks for your help.1.5KViews0likes8CommentsIF with multiple Contains
Similar to the below, I'm trying to make an IF statement with Contains but I am trying to count the times 2 (or more) affiliates appear in a customers click path together. IF CONTAINS WITH MULTIPLE VALUES E.g. Selection1= HUKD Selection2= TCB OrderID Path_Taken Order1 Step1 -> Step2 -> HUKD -> TCB Order2 Step1 -> Step2 -> HUKD -> TCB Order3 Step1 -> Step2 -> HUKD -> TCB Order4 HUKD-> Step2 -> HUKD -> Step4 Order5 Step1 -> Step2 -> Step3 -> TCB The count would equal 3 as they appear in the paths together 3 times. Stringer Code: StringerT4 = CONVERT(SELECTEDVALUE(Steps_AffiliateOnly[taxonomy_4]),STRING) Mutual counter Code: Mutual = IF( AND( CONTAINS(Steps_AffiliateOnly, Steps_AffiliateOnly[path_taken],Steps_AffiliateOnly[StringerT4]),( CONTAINS('Steps_AffiliateOnly_2','Steps_AffiliateOnly_2'[path_taken],'Steps_AffiliateOnly_2'[StringerT4_Second]))) , COUNT(Steps_AffiliateOnly[order_id])) Logically it makes sense to me, but the output is not what i'm expecting. Thanks in advance for any helpSolved1.8KViews0likes6CommentsIF calculation where IF dimension contains Text then Text (with ELSEIF conditions)
Hello! I’m a Tableau user switching over to Power BI/DAX. I’m trying to replicate a Tableau calculation I had but having trouble figuring out the best approach in Power BI/Query. I am looking for an IF Contains THEN formula for multiple instances... Here is the calculation in Tableau: IF CONTAINS ([Campaign Name], “XYZ”) Then “XYZ Campaign” ELSEIF CONTAINS ([Campaign Name], “ABC”) Then “ABC Campaign” ELSEIF CONTAINS ([Campaign Name], “JKL”) Then “JKL Campaign” END Thanks!Solved650Views0likes1CommentCONFUSED WITH USING CONTAINS, CONTAINSSTRING NEED HELP!
Hi guys, all I want to do is simply count all sales orders that contains at least 1 of the products for a selected order. My forumla is shown below. Essentially just confused on how to use contains or containsstring to essentially search for shared values. Any help would be appreciated !Solved1.5KViews0likes4CommentsFIND ORDERS WITH SAME PRODUCTS
Hi guys, I want to create a simple measure that would simply count all the orders that share at least 1 of the same products of a selected order. For example. When I choose ORDER 2 which contains PRODUCT A (PA) , PRODUCT B (PB) I want it to be able to count the orders highlighted in green (shown below) This is my calculation but I cannot get it to work. Any help would be appreciated.969Views0likes4CommentsUsing Switch and Contains for Multiple Conditions
Hello, I have a dataset with two specific columns, Marketing_grouping and campaign_name. I want to create a new column that reads the text string in the campaign_name column and returns a value. We want to identify if the campaign is a Brand or NonBrand campaign. There are other campaigns that are not Brand or Nonbrand specific, so if possible, the new column would return the Marketing grouping. Essentially we are splitting the Marketing_Grouping, Paid Search, into 2 groups, brand and nonbrand, and using the campaign name column to identify. Also, there are paid search campaigns that do no have brand or nonbrand in Its name and we will group them under nonbrand ** Case sensitive: If campaign_name contains NB, Non, non, Non-Brand, and Marketing group = Paid Search, then NB If Campaign_Name contains Brand, BR, and marketing group = Paid Search, then Brand If Marketing_group = Paid Search and Campaign name doesn't contain any of the above, then NB Else, Marketing_Group (all other non paid search campaigns, use marketing group)Solved4.3KViews0likes3Commentssum filtering by multiple criteria using calculate and contains.
hello, I am trying to create a measure that calculates the sum of a column based on the amount 3 months before. I have managed to calculate it with the following measure creating a reference date column that shows the 3 previous month date WR SUM CLAIMQ = CALCULATE ( SUM ('WARRANTY RATE'[CLAIM Q]), FILTER ( ALL ( 'WARRANTY RATE' ), CONTAINS ( VALUES ( 'WARRANTY RATE'[DATE_REFERENCE] ), 'WARRANTY RATE'[DATE_REFERENCE], 'WARRANTY RATE'[DATE] ) ) ) my problem is that i need to add an extra filter to the measure to do the calculation by countries( present in a column in the same table ). so that it can be filtered using a slicer in the report. can someone help me to find a way to include this filter?Solved1.1KViews0likes1CommentDAX Contains multiple values from list
Hi! I have table 1 with column which can contain multiple names, and the table 2 with separate names. I'm wondering is there any way to filter the first table if the column with name contains at least one name from table 2. For example: Table 1: Names Value A, B 10 B 10 C, A 10 C, D 10 F 10 Table 2: Name A C CALCULATE( SUM(Value), CONTAINSSTRING(Table1[Names], VALUES(Table2[Name])) - this measure isn't working, I know, but for example. I need this measure to return 30. I also know that I can use CONTAINSSTRING(Table1[Names], MAX(Table2[Name])) and put slicer with Table2[Name] value, but I'm just wondering maybe there can be any possibility to solve my task. Maybe there is something like CALCULATE( SUM(Value), Table1[Names] IN VALUES(Table2[Name])), but "IN" means equals, and I need it to be contain. Many thanks in advance.Solved3.7KViews0likes3Comments