needs help
12 TopicsAre there any plans to change or deprecate DAX in Power BI?
Hi everyone! I’ve seen a few discussions and comments lately about changes in Power BI, and it made me wonder specifically about DAX. DAX is a big part of how I build models and measures, so I wanted to check with the community if there’s anything to be aware of. Is there any official information from Microsoft about major changes, new directions, or possible deprecation related to DAX? Or is DAX expected to remain the main language for calculations in Power BI for the foreseeable future? Any insights, official references, or practical experiences would be very helpful. Thanks in advance!Solved922Views2likes3CommentsMeasure convert to column in the same table.
I have created a table with column name Tag, Images, Index. Below is the measure i use to view the image. Display Image = CONCATENATEX( d_images_1, d_images_1[Image], , d_images_1[Index], ASC) How can i convert it to column. The custom visual cannot use measure to display the images. Only column can. Thank you and regards, NickzNickzSolved1.1KViews0likes6CommentsQuery Token Literal Expected Error
Hi ... I have reciece an error as below. How can i resolve the error ... let //Get list of files in folder Source = Folder.Files("imagas_path"), //Remove unnecessary columns RemoveOtherColumns = Table.SelectColumns(Source,{"Content", "Name"}), // Creates Splitter function SplitTextFunction = Splitter.SplitTextByRepeatedLengths(30000), //Converts table of files to list ListInput = Table.ToRows(RemoveOtherColumns), //Function to convert binary of photo to multiple //text values ConvertOneFile = (InputRow as list) => let BinaryIn = InputRow{0}, FileName = InputRow{1}, BinaryText = Binary.ToText(BinaryIn, BinaryEncoding.Base64), SplitUpText = SplitTextFunction(BinaryText), AddFileName = List.Transform(SplitUpText, each {FileName,_}) in AddFileName, //Loops over all photos and calls the above function ConvertAllFiles = List.Transform(ListInput, each ConvertOneFile(_)), //Combines lists together CombineLists = List.Combine(ConvertAllFiles), //Converts results to table ToTable = #table(type table[Name=text,Pic=text],CombineLists), //Adds index column to output table AddIndexColumn = Table.AddIndexColumn(ToTable, "Index", 0, 1) in AddIndexColumn Regards, Nickz NickzSolved2.8KViews0likes2CommentsSum of value between two dates
Hello everyone, I want to calculate the total quantity between two dates, the problem is that all of the time I get only the sum of the current day shown in the column CALCULATE(SUM(Sales[Quantity(KG)]), DATESBETWEEN('Sales'[Date], MINX(ALL('Date'[Date]), 'Date'[Date]), MAX(Sales[Date]))) I want to show this value in a matrix form where as rows I have products, and the columns are dates, for example the data in the source file would be Product quantity 20.09.2023 21.09.2023 22.09.2023 A 120 50 110 Product 20.09.2023 21.09.2023 22.09.2023 A 120 170 280 Thank you in advance. Kind regards, StefaniSolved815Views0likes1CommentSort order breaks running total measure!!
I have a simple sales table below: 'Sales' This thrown into a simple Matrix looks like this: My objective is to move the TOTALs to the front of the matrix (left) and then to create a measure that results in a running total week over week of the Goal amounts. To do this I created a new table ( 'Week Order' ) to sum all data across all date points. See picture below: I then related the two tables on 'Sales'[Week] and 'Week Order'[Week Date] This allows me to use 'Week Order'[Week Of] as the column object in my matrix. Now I need to create a measure to calculate the running total of the Goal amounts. Goal Running Total = CALCULATE( sum(Sales[Goal]), FILTER( all('Week Order'[Week Of]), 'Week Order'[Week Of] <= MAX('Week Order'[Week Of]) ) ) When I throw this measure into the matrix everything works fine before sorting [Week Of]. You can see below that the running total for goals adds each week. 4/10/23 = 250, 4/17/23 = 100 + 250, 4/3/2023 = 125+ 100 + 250 Now, when I sort [Week Of] by [Order] the measure no longer compiles the Goal total each week. This is the problem I need help solving.640Views0likes1CommentDAX Measure, Slicer Selected Last Date on Graph
Hello everyone. I've been banging my head against the wall trying many iterations of this. I've provided an example of the data below. Basically I'm trying to plot how many people finish a group of courses (the last day they finish a course in the selected group) vs. the date on a plot. The Class slicer can change to a users selection and is a separate table. I thought I would do something like this but am running into issues getting the proper value and plotting it on a visual. The user can select any combination of courses in the slicer. In the below example they have selected A, B, and C - which only four people have completed. Their final completoin date would then be plotted against how many users finished on that date. calculate(distinctcount(Table[Name],filter(Table, Courses Completed = Courses Selected && Table[Completed] = max(Table[Completed]) Without bringing in the date to a visual I can count the correct number of users that have completed all of the courses. CoursesSelected = calculate(countrows(CourseListTable)) Current Courses Completed = calculate(distinctcount(Table[Class])) Current People Completed = calculate(countrows(filter(values(Table[Name]),Current Courses Completed = Courses Selected))) I appreciate any advice or links to tutorials!Solved860Views0likes2CommentsHow 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.9KViews0likes9Commentscalculate time difference between two timstamp columns in direct query mode in PowerBI
I need to calculate the time difference between two timestamp columns in my table and create a new column with the calculated values but as I'm doing this in the direct query mode, I have some limitations for it. I tried datediff, duration.totalseconds etc but nothing really worked.. the result I want is I got this result using the sql below select (unix_timestamp(timestamp1)-unix_timestamp(timestamp2))/3600 as hourly_diff from azure_anomaly_detection_pilot.ops_log Could anyone help me on this? Thank you!Solved2.5KViews0likes3CommentsConvert SQL query into DAX
Hi, I have converted the SQL query below into DAX select count(job_id)from( select distinct job_id, job_active_status,last_execution_datetime from table1 s1 where job_active_status = "PAUSED" and last_execution_datetime = (select max(last_execution_datetime) from table1 where s1.job_id = s2.job_id)) Paused_Jobs = VAR latest_timestamp = MAX('table1'[last_end_datetime]) VAR countid = CALCULATE( DISTINCTCOUNT(table1[job_id]), table1[job_active_status] = "PAUSED") VAR result = CALCULATE(countid, table1[last_end_datetime]= latest_timestamp) RETURN result They give the same result but I'm not sure if the DAX query I wrote corresponds to my sql query logically and makes sense. Could anyone please correct the query if it's wrong? thank you!511Views0likes1Comment