dax
37 TopicsCreate a new table based on filters
I have and e-learning data with duplicates across the different columns just like this First Name Last Name Course title Status Completion date James Paul Course A Registered James Paul Course A Completed 1/2/18 James Paul Course B Registered James Paul Course B Completed 3/5/18 Anne Peter Course A Registered Anne Peter Course B Registered Anne Peter Course C Registered Anne Peter Course C Completed 5/8/20 I want to create a new table with columns: [first name], [Last name], [course], [Status] using a DAX expression. Each person would have one unique row for the completion status of each course. If a course has been completed, I only want that row on the new table (filtering based on the completion date not blank and if no completion date exist, the status is marked "Incomplete") For Instance: First Name Last Name Course title Status James Paul Course A Completed James Paul Course B Completed Anne Peter Course A Incomplete Anne Peter Course B Incomplete Anne Peter Course C CompletedSolved56KViews0likes6CommentsCreate an Average calculation grouping by two different fields
I need to create the calculation for the avg score grouping by subtheme per each client(case ID). I created a expected output based on some inputs values: As you can see, first all i need to sum the score per subtheme, then divide each client score for the subtheme which its belongs. I have tried several formulas, such as: Nothing works as expected: sometimes the values returned are the same as the score field for each client/caseid, or either it just calculate the sum of the score/count(total clients), what is not true, sice the nominator will variate depending of the score oh that or other specific client per suntheme each belongs. If someone know how to solve it. i would appreciate a lot. 🙂Solved493Views0likes2CommentsDifference between timestamps to calculate average response time
Hi, I need to calculate the average response time between two timestamps For example, in this case should be: 0 days 0 months 0 years 00:04:41 (my goal is to have a card with the average response time) thank you all440Views0likes1CommentRetrieving the biggest text length value for every column in table
Hi! I'm cleaning and preparing data before an erp migration, and I would prefer to have the task more automated since the it will be recurring. I need to check every column for it's longest value (longest as in largest amount of characters) to ensure that the set length limitations in the target erp do not cut any values Let's say I have data that looks like this: Table.FromRecords({ [CustomerID = 1, Name = "Bob", Phone = "123-456712"], [CustomerID = 22, Name = "Jim", Phone = "987-6543"], [CustomerID = 333, Name = "Paul", Phone = "543-7890"], [CustomerID = 4444, Name = "Ringo", Phone = "232-155042424"] }) Here I would want a table with two colums, or any viable solution, really. One with the column names from the source data, and one with a number representing the longest value for that column. Also preferably not hard coded with column names or similar, to be able to swiftly reuse for new cases. Something like this: ColName - Len CustomerID - 4 Name - 5 Phone - 13 Hope you can crack this one!Solved2KViews0likes3CommentsDAX
Hello, I have Table with 3 columns Project Number, Project Cost and extraction Date. Each end of month, i do extraction to know the cost of each project. How to write dax powerbi to calculate the changes of the only running projects over months, and exclude the First record of project number i.e. first Date "in extaction date" of Project number - But to start count thos new record from the second month as long as they existed ?1.3KViews0likes5CommentsHow to Sum Row Count and show total sum value in every row
Hi community, Hoping you can assist, i am trying to Sum my count and show the total in a new column for every row. See below: Total Occupany is a measure counting the records based on my slicer selection. I I am trying to sum the count values into a new column and show the value in every row. Thanks in AdvanceSolved38KViews0likes6Commentsdynamic percentage
Hello everyone. I am currently working with the following dynamic table. The idea of this is that in the %Total column of Count Uid, 100% appears for the product in general, but when subdividing it by the price range, it appears to me the percentage that each range is distributed to form 100%. I currently have this DAX measure, but I have not been able to discriminate each percentage in order to achieve my objective. %Total Count Uid for Ranks = VAR Den = CALCULATE([Count Uid], ALLSELECTED(Compliances)) RETURN DIVIDE([Count Uid],Den) If anyone can help me with this I would be grateful. Thanks in advance for any assistance.Solved3.3KViews0likes2CommentsPorcentajes en tabla dinamica
Hola a todos. Actualmente me encuentro trabajando con la siguiente tabla dinamica. La idea de esta es que en la columana de %Total de Contar Uid me aparezca el 100% para el producto en general pero al subdividirlo por el rango de precios me parezca el porcentaje que se reparte cada rango para formar el 100% Acutualmente tengo esta medida de DAX, pero no he conseguido que discrimine cada porcentaje para poder lograr mi objetivo. %Total de Contar Uid para Rangos = VAR Den = CALCULATE([Contar Uid], ALLSELECTED(Cumplimientos)) RETURN DIVIDE([Contar Uid],Den) Si alguien me puede ayudar con esto quedo agradecido. Gracias de antemano por cualquier ayuda.781Views0likes1CommentHow to get last week value per each category
Hi All.. I want to return the last week value per category. Here are the data and the example: WeekNo Value Category 1 1 A 2 2 A 3 1 A 1 2 B 3 1 B I want to create a table that shows the selected week value and the n-1 selected week value. I'm currently using this measure: LastWeekValue = calculate( sum('table'[Value]), FILTER(ALL('table'), 'table'[WeekNo]= SELECTEDVALUE('table'[WeekNo]) - 1)) And here's the result of the measure: Assuming that the selected week no is 3 Category SelectedWeekValue LastSelectedWeekValue A 1 2 B 1 2 The measure is showing the right sum of value on previous week. However, the value is showing the same value on each category. (Category B shows value = 2, eventhough that it actually has no value on week 2). Here's the desired output looks like : Assuming that the selected week no is 3 Category SelectedWeekValue (week no 3) LastSelectedWeekValue (week no 2) A 1 2 B 1 0 Please help me to solve this. Thank you so much!!!!!Solved736Views0likes1CommentWhat-if parameters
At the retail company i work, the sales men are giving the customers discounts. At the end of the year, the sum of sales after discount =100M and the total dicounts amount=45M. i want to make a what if parameter to the discounts in which i make it dynamic to show that : if we decreased the discount amount by 10% the sales would have increased by so and so .. how can I achieve that ?1.2KViews0likes2Comments