exclude
7 TopicsBest way to exclude values with dax
Hello, I am new to dax and i would really like your advice. I have a product table with products assigned to categories. We decided to exclude some products of the category 1 and i needed a measure to calculate only the products that were not excluded and another measure for only the products we excluded. I managed to do it, but i was thinking there is a better and more efficient way to write that measure. This is my table: PRODUCT ID PRODUCT CATEGORY 1 PRODUCT CATEGORY 2 PRODUCT CATEGORY 3 PRODUCT CATEGORY 4 PRODUCT CATEGORY 5 1000 1 1001 1 1002 1 1003 1 1004 1 1005 1 1006 1007 1 1008 1 1009 1 1010 1 1011 1 1012 1 1013 1 1014 1 1015 1 1016 1 1017 1 1018 1 1019 1 1020 1 1021 1 1022 1 1023 1 1024 1 And these are my measures: Correct Product Category = CALCULATE(SUM(PRODUCTS[PRODUCT CATEGORY 1]), FILTER(PRODUCTS,PRODUCTS[PRODUCT ID] <> 1000), FILTER(PRODUCTS,PRODUCTS[PRODUCT ID] <> 1001), FILTER(PRODUCTS,PRODUCTS[PRODUCT ID] <> 1007) , FILTER(PRODUCTS,PRODUCTS[PRODUCT ID] <> 1014) , FILTER(PRODUCTS,PRODUCTS[PRODUCT ID] <> 1023)) Product Exceptions = CALCULATE(SUM(PRODUCTS[PRODUCT CATEGORY 1]), FILTER(PRODUCTS, PRODUCTS[PRODUCT ID] = 1000 ||PRODUCTS[PRODUCT ID] = 1001|| PRODUCTS[PRODUCT ID] = 1007||PRODUCTS[PRODUCT ID] = 1014 ||PRODUCTS[PRODUCT ID] = 1023)) I would really appreciate your suggestions. Thank you in advanceSolved27KViews0likes5CommentsExclude whole group if value is not found
Hi My problem is similar to this one, but excluding values when not found. I have a "Store" column and a "Product" column and i want to show all products from the store only when it has the product "Paint", if a store doesn't have "Paint" in one of its rows i need a filter that excludes all of the store in all pages of my model. If this is my Data: ID Store Product 1 1 Chips 2 1 Paint 3 2 Paint 4 3 Soda 5 3 Chips I want my model to work only with this rows (Store 1 and 2): ID Store Product 1 1 Chips 2 1 Paint 3 2 Paint Thanks a lot!Solved1.3KViews0likes3CommentsExclude Users from Ranking RANKX
Jolly Day, I am needing to exclude three users from being included in the ranking. What I currently have just inserts a dash where there ranking number would be and are still being ranked. Could someone help me with a measure to completely exclude them? Entry Rank = IF(SELECTEDVALUE (System_Users[Account]) IN {"cbelcher","pkessell","kcole"}, "-", RANKX(ALL(System_Users),Audit[Sum Entry]) ) Many thanks in advance!Solved711Views0likes2CommentsWant measures to exclude calculation when date doesn't exist.
Completed hold stage for the top three rows hasn't got a completion date populated yet and it's defaulted to 44798.00 All the rows under this dont have a completion date for complaint actionable and it's doing the same thing. I want the DAX to give today's date if there is no completion date populated but only if the action EXISTS. I'm trying to get this to show the amount of time for each measure in days. Here are the two measures: Completed Holding stage age = VAR startdate = MAXX(FILTER('hgmcntac', hgmcntac[action_cd] = "C1001A"), hgmcntac[completed_dt]) VAR enddate = MAXX(FILTER('hgmcntac', hgmcntac[action_cd] = "C1002"), hgmcntac[completed_dt]) RETURN ROUNDUP((enddate - startdate) * 1,0) Complaint actionable = VAR enddate = MAXX(FILTER('hgmcntac', hgmcntac[action_cd] = "C1001A"), hgmcntac[completed_dt]) VAR startdate = MAX(hgmcntct[taken_by_dt]) RETURN ROUNDUP((enddate - startdate) * 1,0) Thanks in advance, DanSolved573Views0likes2CommentsHow to exlude SUM of zero
Hi, Here is a measure SUM (0+0+0+0.6+0.6+0.6...) divided by COUNT of dates. The question is how to exclude those dates when summary equals 0.00 from this calculations? Currently it calculates: 4.2 / 12 = 0.35 I need it to calculate: 4.2 / 7 = 0.6 the reason 0.00 is showing for some dates is because in the data there is 0.6 but later on there was another data added with -0.6 for those dates. Hence below we see the summary. Thank you!Solved1.2KViews0likes4CommentsDax formula to get id's that not exists in other table
hello all I got this measure : var maxDate =[max date selected] var minDate =[min date selected] return CALCULATE( [TotalCost] , billing[Rehesh Muchrag Flag]<>"Y", billing[FINAL]="Y", billing[STORNOFLAG]<>"Y", FILTER(billing,AND(billing[IVDATE]<= maxDate ,billing[IVDATE]>= minDate ) )) what i need to add to get only customer id that no exists in other table ? for example in sql its - where a.customer_id not in ( select distinct b.customer_id from other table b )Solved1.4KViews0likes1CommentGenerate dynamic exclude table
Hi, I am trying to generate a dynamic table shows the inverted result of a slicer. In order to obtain this, I used the follow measures/tables: The original table for which I am trying to make the inverted selection Cars_table Table for slicer Unique_brand = SUMMARIZE('Cars_table','Cars_table'[brand]) List of all selected values selection_list = VAR part_1 = CONCATENATE(UNICHAR(34),UNICHAR(44)) VAR part_2 = CONCATENATE(part_1, UNICHAR(34)) VAR core = CONCATENATEX(Unique_brand, [brand], part_2) VAR with_lead = CONCATENATE(UNICHAR(34), core) VAR with_tail = CONCATENATE(with_lead, UNICHAR(34)) RETURN with_tail Table with result I want to obtain Result_table= FILTER( ALL('Cars_table'),NOT CONTAINSROW({selection_list}, 'Cars_table'[brand])) However, the result table does not seem to interpret the 'selection_list'. There are no errors, but there is no filtering going on either... Any help would be greatly appreciated.Solved1.7KViews0likes3Comments