summarize table
5 TopicsWhen creating a new table using Summarizecolumns, can I use a parameter?
Hi Guys, I've created a new table based on an existing one using the following DAX: New Table = SUMMARIZECOLUMNS ( 'Original - wind cap factor'[Hourly Wind Max Gust 10m (km/h)], 'Original - wind cap factor'[Year], FILTER ( 'Original - wind cap factor', 'Original - wind cap factor'[Hourly Wind Max Gust 10m (km/h)] > 80)) This new table has 7 rows only - which is correct for what I need. However, instead of having the fixed value in blue 80, I would like to use a parameter (numeric field) I've created in the visuals - so that the user could change the parameter as he needs and the numbers get recalculated based on that. This parameter is created under the Modelling tab - New pArameter - Numeric Field. The problem is that when I have it as fixed value 80 it works, but when I use the parameter, it does not work. Below is the DAX I tried to use linking to the parameter: New Table = SUMMARIZECOLUMNS ( 'Original - wind cap factor'[Hourly Wind Max Gust 10m (km/h)], 'Original - wind cap factor'[Year], FILTER ( 'Original - wind cap factor', 'Original - wind cap factor'[Hourly Wind Max Gust 10m (km/h)] > SELECTEDVALUE ( '.Wind speed'[Wind speed] ) ) ) When I use the above DAX linking to the parameter, the amount row of grows as it does not summarize the columns as I wanted. Would you guys be able to help me make it work? Below is a photo of how this parameter is shown for the users: Thanks, Diego461Views0likes1CommentHow to create table using DAX (some questions on SUMMARIZE Function)
Hello, I've a table (let's call it 'Table' 😁) with fields A, B, C I'd like to create a new table with all values from A where B=1 and all values from A where C=2. I'm trying to create a table using SUMMARIZE function : NewTable = SUMMARIZE(Table,'Table'[A]) <= I've got all distinct values of A (which is a good start) 1) Now, how can I filter to keep only values from A field where 'Table'[B]=1 ? (What is the best efficient way ?) 2) Then I'll have to concatenate (union) with all values of A where C=2, what is the easiest / efficient way ? Am I forced to build to different tables then concatenate / append / union it or can I create it in one Dax command ? Best regardsSolved1.9KViews0likes9CommentsPercentile of a table stored in a variable
Hi all, I would like to detect outliers in my daily data report by using the percentile function. I have a detail table (table 1) and I want to calculate the percentile of the second table which shows the tickets per day. If I create a fixed calculated table I have to add "ALL / AllExcept" function inside Percentile function: Percentile = PERCENTILEX.EXC (ALL(TicketsByDate), TicketsByDate[Count_Tickets], .90 ) I need to apply external filters and I don't want to rely on the All/AllExcept function. For this reason, I want to store my calculated table in a variable. The problem is that I can't calculate the percentile of this calculated table in a variable. I get the following error: "If k is not a multiple of 1/(n + 1), PERCENTILEX.EXC will interpolate to determine the value at the k-th percentile." Can someone help me? Thanks!!!Solved3.6KViews0likes6CommentsDax for Summarized table on a condition
Hello, I needed help with writing a Dax for summarized table on a condition, meaning with a condition is true group the records and if condition is false don't group the records. In below example, Service Folder 8516 have 2 records of item B5068-Y1(in yellow) and here workstatus is same(i.e. 4), so we can summarize the 2 records taking max of createddate, workclosedate, sum of quantities and max of workstatus. But when work status is not same for an item like B5063-K1(in orange), I need to keep both the records in the summarized table. Similarly, for Service folder 1013 item B4130-540-1-Y1(dark green) which is a duplicate and have same work status should be grouped. This grouping needs to be done line level meaning considering item with Service folder and transferID. Problem Table: Solution Table: Thanks in AdvanceSolved3.7KViews0likes2CommentsCumulative distinct count
Hello, I need to create a table (using SUMMARIZE) and I need one of the fields to calculate the cumulative distinct count of people that have been tested. My data is similar to this: This is what I expect to have as the table outcome. So for the month #3, I want to count all the people that have been tested so far in month 1, 2, and 3. All I have been reading is to tacke this via a measure, but I need to create a table for this purpose. Thank you for your help!578Views0likes1Comment