addcolumn
2 TopicsSelection from Slicer as column in virtual table
Hi all. I'm trying my best to describe the issue I have... I need to create a virtual table which includes one column that shows the selection from a slicer Slicer: I have a slicer to select Business Unit. I also have a measure which gives me the selected item from the slicer with SELECTEDVALUE physical Table: I have a table with data from different Business Units virtual table: I have a virtual table which is based on the physical table from above but I add a couple of columns with ADDCOLUMNS. So far all good. Since I need the virtual table to be filtered to only the Business unit which is selected in the slicer, I was trying to add the result of the SELECTEDVALUE measure from above to a new column but this doesn't work. It stays blank. The formulare for the virtual table looks like this: I'm looking for a way to replace the hardcoded "Business Unit XY" wich what is selected in the slicer HL Virtual = VAR newTable = ADDCOLUMNS(HL_Template; "RATETYPE"; LOOKUPVALUE('Data'[RATETYPE];'Data'[MG_ACCOUNT ID];HL_Template[MG_ACCOUNT]); "Selected Unit"; "Business Unit XY") VAR filteredtable = SELECTCOLUMNS(newTable; "MG_ACCOUNT";HL_Template[MG_ACCOUNT];"Unit";HL_Template[Unit];"RATETYPE";[RATETYPE];"Selected Unit";[Selected Unit];"Unit = selected Unit";IF(HL_Template[Unit]=[Selected Unit];"YES";"NO")) RETURN FILTER(filteredtable;[Unit = selected Unit]="YES") I'm happy for any hints in the right direction. Thanks guys!Solved2.7KViews0likes3CommentsAdding a new column based on ID with relationship between tables
Hi! I have two tables with a relationship based on order id. What I'm trying to achieve is to add "date" column from "Order Product Histories" to "ORDER PRODUCTS" table. The "date" in "Order Product Histories" table indicates the date of booking and the "date in ORDER PRODUCTS" table indicates the execution date. The case is I have multiple DAX measures already created and I cannot use both relationships between my calendar table and "ORDER PRODUCTS" with "Order Products Histories" at one time. I would like to use the date from "Order Product Histories" table to filter my measures, so I thought it would be the best to add a new column to "ORDER PRODUCTS" table. Looking forward to any tips to make it efficiently work! 🙂5.7KViews0likes1Comment