dax data table
13 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 a table from master table using DAX
I have the Master table by name "h1_daily"as follows Insertion Number Month Date WEEK NO SHIFT GROSS OPERATING TIME ITEM CODE Status MACHINE NET OPERATING TIME AVAILABLE TIME EXPECTED OP Unit Cavities Equipment failure loss Setup & Adjustment loss Cutter & Tool change loss Startup loss PS 000001 Sep-24 2-Sep-2024 Week 23 A 420.00 SD00126 BLANK SSP-100T-01 395 242 29040 NOS 2 0 10 10 0 PS 000002 Sep-24 2-Sep-2024 Week 23 A 90.00 SD00210 BLANK SSP-100T-01 75 40 3200 NOS 2 0 35 0 0 PS 000003 Sep-24 2-Sep-2024 Week 23 B 510.00 SD00146 BLANK SSP-63T-02 470 250 12500 NOS 1 0 30 35 0 PS 000004 Sep-24 2-Sep-2024 Week 23 A 90.00 PA00208 BLANK SSP-63T-01 60 60 6000 NOS 2 0 0 0 0 PS 000005 Sep-24 2-Sep-2024 Week 23 A 70.00 PA00210 BLANK SSP-63T-01 70 66 6600 NOS 2 0 0 4 0 PS 000006 Sep-24 2-Sep-2024 Week 23 A 290.00 PA00694 BLANK SSP-63T-01 250 165 9900 NOS 1 0 25 0 0 Colums highted in blue colours is required in new table as follows MACHINE Total losses Total time SSP-100T-01 Equipment failure loss 0 SSP-100T-01 Setup & Adjustment loss 45 SSP-100T-01 Cutter & Tool change loss 10 SSP-100T-01 Startup loss 0 SSP-63T-02 Equipment failure loss 0 SSP-63T-02 Setup & Adjustment loss 30 SSP-63T-02 Cutter & Tool change loss 35 SSP-63T-02 Startup loss 0 SSP-63T-01 Equipment failure loss 0 SSP-63T-01 Setup & Adjustment loss 25 SSP-63T-01 Cutter & Tool change loss 4 SSP-63T-01 Startup loss 0 I have used dax query as follows Measure 1 = union(SELECTCOLUMNS(H1_daily,"MACHINE",H1_daily[MACHINE],"Total time",H1_daily[CLITA],"Total losses","Clita"), (SELECTCOLUMNS(H1_daily,"MACHINE",H1_daily[MACHINE],"Total time",H1_daily[Cutter & Tool change loss],"Total losses","Cutter & Tool change loss]"))) but givin error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value." Can any one help?Solved565Views0likes2CommentsHow to make a graph understand that the week number is next year (to make the date sort right)?
Hi, I have this data: And I have made this graph - which shows completed sales and expected future sales. This works great for when I use the "Date" field, but I want it on week level, and when I do that it looks strange (see picture below), because Power BI doesn't understand that week 1 is next year, and hence is after week 52. Is there a way to make it understand that week 1 is next year? And hence that the graph looks more similar to the one with "Date"? Thanks in advance, highly appreciate it 🙂Solved3.3KViews0likes11CommentsHow to store data in a table based on month calculation
Hello Everyone, I am posting this request again as i was not able to get the help please find the question and details below So I have Table 1 created out of data scores like below Table 1 Issues Name&Percent Sales 82.86 Prod 21.27 Eng 6.06 Quality 1.09 Admin 1.05 Avg of issues for Sep 22.47 In next month Table 1 one will have different value Issues Name&Percent Sales 85.86 Prod 25.27 Eng 7.06 Quality 1.09 Admin 1.05 Avg of issues for Oct 24.06 So I want to create another table which can store month wise average data based on Table 1 Average Table Avg of issues for Sep 22.47 Avg of issues for Oct 24.06 Thanks and Regards Premlata @memmbers570Views0likes2CommentsAverage value based on two columns in another table
Hello PowerBI community I have two tables PreviousOrders and FutureOrders. PreviousOrder Facility Processing Time OrderType A 13 Express A 15 Normal B 19 Express C 10 Normal A 11 Express B 15 Express B 13 Express C 14 Normal FutureOrders. Facility OrderType ExpectedTime A Express =averageif(A and Express in First table) B Express C Express C Normal A Express A Normal B Express C Normal I would like the ExpetedTime in the “FutureOrders” table to be the "Processing Time" for that facility and order type based on the data in PreviousOrder. Is there an easy way to do this in DAX? Thank youSolved1.4KViews0likes3CommentsDelete rows with duplicate entries in table using DAX or Tranformation
Hi, I want to get rid of the rows containing Asia,Delhi then Asia,Shimla and Asia,Panjim as region and location in below table and also it has 100 enties like this[with same combination] . Can we have any DAX or trasformation rule to handle this? Input source table: Region location Averagemarks SchoolName Asia Delhi 90 ABC India Delhi 90 ABC India Chennai 85 DEF Japan Tokyo 88 XYZ Asia Shimla 92 WEF India Shimla 92 WEF Asia Panjim 78 LMN India Panjim 78 LMN Asia Goa 66 JKL Asia Hongkong 71 OPP Asia Karachi 41 LMI Expected Output: Region location Averagemarks SchoolName India Delhi 90 ABC India Chennai 85 DEF Japan Tokyo 88 XYZ India Shimla 92 WEF India Panjim 78 LMN Asia Goa 66 JKL Asia Hongkong 71 OPP Asia Karachi 41 LMISolved908Views0likes3CommentsDAX query to create DAX table with average values per month against category
Hi All, I have the below input source table with Audit Date,Score,SchoolName and PercentageStudents columns and table name as Table. I need to find the average of score and percentageStudents per month for 2021 and categorize them in a table. In the below source input table , we have input data for the months of August and September 2021. In real time we will have data for all months in 2021. AuditDate Score SchoolName PercentageStudents 15.08.2021 -2 A 20% 15.08.2021 -1 B 30% 16.08.2021 3 C 22% 16.08.2021 0 D 45% 16.08.2021 -1 A 65% 17.08.2021 -1 B 17% 17.08.2021 -1 C 29% 18.08.2021 3 A 78% 18.08.2021 0 C 87% 19.08.2021 -1 C 22% 19.08.2021 3 D 45% 19.08.2021 0 E 65% 20.08.2021 -1 B 17% 21.08.2021 2 D 29% 22.08.2021 1 E 22% 22.08.2021 -1 A 45% 1.09.2021 0 E 65% 1.09.2021 -1 B 17% 2.09.2021 2 D 29% 3.09.2021 1 E 22% 3.09.2021 -1 A 45% 4.09.2021 1 C 65% 5.09.2021 1 C 17% 5.09.2021 3 A 29% Expected Output I want to create a custom table inside PowerBI which should use the input source table values as above to calculate the average per month and should look as below :- Here : Category has two static values namely "Average Score" and " Average Percentage" in the Category column which should populate against each month average as per below tale matrix. In this example we have taken two months namely August and September but in real scenario it can be all the 12 months in a year. Category ParamScore CurrentMonth AverageScore 0.1875 August AverageScore 0.75 September AveragePercentage 40% August AveragePercentage 36% September Could anyone please help with any possible DAX query to create this output table? Appreciate for all the help in this regard Kind regards SameerSolved6.6KViews0likes9CommentsImprove visual table - problem with sum by dates
Hello everyone! I'm new in power bi (expert in Excel) and I did an dashboard based on varied data sources (Share Point List, Oracle and more). My dashboard presents the total manufactre work orders on the machines in my factory and also the invalid items that the QC department reject. When the user pick a date to slice, the data that need to show is the work order that active in the machine, according to the slicer date, and the total amount manufactre an the invalid item for this day only. My problem is when I make an visual table that need to shows the OEE of the machine in the amount of the invalid items, the visual table shows the total amount for the specific work order but nit according to the date slicer. I thought maybe to creat an marge table, but the data that shows for the invalid items is the total amount of all invalid items from day one. Here is an screensot of the visual table: Here is an screenshot of the invalid table according to the highlight exmple in the previous screenshot: Here is an screenshot of the marging table and the sum of the invalid items column formula:Solved842Views0likes3CommentsAverage Last 6 months accumulated
Hello dear community, I come to you so that you can help me with this DAX calculation. I need a Calculated Column to show me: the average of the last 6 months accumulated for each collaborator (in case the collaborator appears> = 6 times in the year); or in the event that the employee in the current year period appears less than 6 months, showing the average based on the number of months that the employee has been in the company in the current period, for example: Year Filter: 2021 Current month: May2021 (5) Seniority of the collaborator to May2021: 3 months (that is, the collaborator appears 3 times until May, if in June it becomes active, the collaborator when we are in June then it will appear 4 times, and so on) So the average will be = (Mar + Apr + May) / 3 Also consider that I already have a calendar table in my Power BI. Here I have an example sample of what I want exactly (column "Average Last 6 months), you can download the file here: I also leave the extract here: I read them, I hope they can help me as soon as possible. and thank you very much in advance. Nestor ReyesSolved7.8KViews0likes2CommentsQuery IDs from previous quarter
I'm trying to make a DAX query which can pull all the customer ID from previous quarter and their respective data columns based on slicer selection but I'm not able to figure out the right function to use here. I've tried using SUMMARIZECOLUMNS and GROUPBY after looking up at some examples but the syntax doesn't seem to be correct. For Eg: If a user select EffectiveDate: December, 31, 2020 from the dropdown, the table should have IDs of previous quarter ( EffectiveDate: September, 30, 2020). I know how to do it in sql/python but not sure what is the right approach/function to dynamically query rows based on filter selection. These are the final table columns I'm trying to extract. I've attached the pbix file for reference. The table I have used in filtering the current quarter selection and not dynamic. Note: EffectiveDate will always be last day of quarter in my case. PBIX Link: https://drive.google.com/file/d/1A-l-uQpk3enSsAOn5IfFux4NcRE18p_V/view?usp=sharing Let me know if there's any way to achieve this. ThanksSolved2.3KViews0likes8Comments