variable column
2 TopicsDoing a rank with a column created in variable
Hi everyone, I need to rank the Sales of the Employees, but I have a table and a new column called Test created as a variable in th DAX. This is to improve the performance. I have tried it without and it is taking too long to load, so this is my only solution. The loading time is no problem anymore but now I dont know how to iterate through the new column Test to get the ranking right. I need to use that column (which is a replication of the column Sales) because the column Sales is based on a lot of measures, which is the reason why it takes so long to load. The query is executing but the rankings come out all as 1. It must be due to the SUMX() that just compares every row with itself. How can I fix this? Your help is gretaly apreciated. Measure = VAR table_ = ADDCOLUMNS ( SUMMARIZE ( 'TableEmployee', 'TableEmployee'[Employee], "Sales", 'TableSales'[Sales] ), "Test", [Sales] ) RETURN RANKX( ALLSELECTED( 'TableEmployee'[Employee] ) , ( SUMX(table_, [Test])),,ASC,Dense)1KViews0likes3CommentsVariable column depending on filters
Hi, I want to calculate statuses on columns depending on filters applied in the model. The reason why I cannot make it in measures is because it wouldnt work in the segmentation visual. Here are two examples of what I need: Verify if a line of info contains the last date of visit of each name of store. If it is the last date then yes else no. This will change if we select different dates, so I would want the expression to be evaluated everytime I select different filters (not only date but all filters in the model). Evalutate clusters: Make it Client A if it has sold more than XXX$ in the last 5 months, B if has at least one purchase order in the last month and has not sold more than XXX$ in the last 5 months. Again, this will be different depending on the date selected. I would appreciate some help, thank you all in advance!!Solved1.7KViews0likes6Comments