select
3 TopicsDAX code filtering tabled based on selected value (show other values)
Hi all, I have an issues to which I cannot find the solution. I hope someone can help me out. I've created an example dataset to explain the problem: customers order food and drinks in a restaurant. They can order multiple types of food and drinks during 1 visit. Here is a sample of 5 different customers with their orders: I can edit this table to make it a one record per customer list: Now what I would like to know is when I select one item in a slicer/filter, what are the other most ordered items per type (food/drinks) based the customers that ordered the selected item? Example: I select as item Fries. Customer B, C and E ordered Fries. During the same order, they also ordered other food and drink items. I want to count the number of times the other items were ordered to see which item is most often ordered together with fries. This is what I would like to see then: My thoughts were to first create new DIM table with the type and item combinations (a food and drinks list) which can then be used for the filter. I can create a relationship between the new DIM table and the FACT table in the model view so that I can filter the customers with orders that contain the selected item. Then I somehow need to use this list of selected customers to filter another table (a copy of the original FACT table with all the customers and their order information?) so that I can see the whole order of these customers. And then I can create a visual of the number of items, per type, in which I exclude the selected item. I hope someone can help me out 🙂 Many thanks, AnneSolved1.2KViews0likes5CommentsCurrency Symbol not displaying in Card visual with SWITCH statement
I am new to DAX and I have tried to implement solutions on this community forums into my switch statement, but I am not sure where I am going wrong? I believe I must use the FORMAT command, but unsure how to structure this into my switch statement. Below is my selector measure and switch measure that I have created as measures. This "Selector measure" is used as a toggle between the different metrics ($ and FTE). The "Switch Measure" works fine when used in a table/matrix. Many thanks in advance! Problem: Everytime i switch to the Currency metric, the Symbol does not display as a prefix to the numbers. Can you please help me modify my measures to allow the Currency symbol to display when only the $ metric is selected, and for FTE is just default to no prefix? Other Measures used within the Switch measure: [Costing ($)] = SUM(Totalcostperproject) [Costing (FTE)] = SUM(TotalFTEperperson) Selector Measure: Selector = UNION(ROW("Type","Hrs."),ROW("Type","Wks."),ROW("Type","FTE"), Row("Type","$.")) Switch Measure: Cost Selection = var selectitem=IF(HASONEVALUE(Selector[Type]),VALUES(Selector[Type]),BLANK()) return SWITCH(selectitem, "$", [Costing ($)], "FTE", [Costing (FTE)], BLANK())Solved1.7KViews0likes4CommentsSelect row in table to filter another table to show all related rows
I have a table of data which has all contacts and another table with all actions related to that contact. The relationship is one contact_no to many action_cd All actions have a reference number in the contact table. I have a table that I have filtered to show a specific action if it is overdue but if I click that action I want it to show all related actions using the contact_no. It's kind of working back from the row context. So when I click on any of these actions I want another table to show me all actions related to the contact_no. Any help would be appricated. Thanks, Dan.Solved1.6KViews0likes2Comments