datatable
8 TopicsWorking with DATATBALE in Query View! Is this some kind of bug or am I doing something wrong?
I was playing around with the Query View in Power BI Desktop. I wanted to create a table from scratch without importing from any source and then I wanted to show output of the table also perform some calculations on it later. I thought of using Table Constructor first but as it doesn't allow to give names to the columns directly so I used DATATABLE instead. I tried to run this query in the Query View: DEFINE VAR Sample_Table = DATATABLE( "First Name",STRING, "Last Name",STRING, "Time",DATETIME, { {"Reza","Rad",0}, {"Leila","Etaati",}, {"someone",,"2019-2-10"}, {"Unknown",blank(),"2019-2-10"} } ) EVALUATE EVALUATEANDLOG(Sample_Table) Then I got the error: "DAX Evaluate queries work only on databases which have at least one tables." Now after searching on google and asking copilot, I didn't get anything relevant to this. Then finally I decided to make a Calculated Table and as usual it worked and I could perform all the operations. Now I tried once again to debug the previous code. So I deleted that Caluclated Table and then ran the query, that I've provided above, in the Query View. To my surprise, the query ran and gave the output. I thought it maybe because of cache so I canged the values in DATATABLE and again the query gave output with changed values. To summarize this, I am providing the recording of the same. Please tell if this is some kind of bug or is there something wrong with the code. Link to VideoSolved1.3KViews0likes4CommentsCreate a custom static table using DAX
I am trying to design this chart in powerbi. The x axis contains different time limits. Currently this is design in excel and the table below is the source of data Average Tests March 2 April 1 - 28 4 April 29 - July 17 56 July 20 - Oct 9, 2020 63 Oct 12 2020-Nov 11, 2022 15 This table is created after getting average test from the same column on a different table below Date Number of Tests 03/09/20 1 03/10/20 2 03/11/20 1 03/12/20 0 Currently powerbi has access to the primary dataset below Date | Name| Race/Ethnicity | Result My inital thought was using DAX ROW or DATATABLE to create a Virtual or static table and use the average function to get the numbers. I am stuck!!! I will honestly appreciate any help provided.Solved2KViews0likes2CommentsData puzzle with great value!
Hello! I am new to Power BI and trying to do somethign quite complicated - or so I believe. I have two columns, one with let's say 'numbers X'. I have another column with let's say 'numbers Y'. I would like to return all X values with the same Y value for selected values in column 'numbers X', but not returning a repeat within a selected value from 'numbers X'. The issue I am running into is the lookup function is returning a repeat selected value for itself. See example below. '1' and '2' would be returned because it was found with same 'numbers Y'. '4' would not be returned because 'numbers Y' did not have a repeat value outside of itself. numbers X numbers Y Selected Values (drop down of 'numbers X') Results ('numbers X' with same values in 'numbers Y') 1 10 1 1 1 12 2 2 1 10 4 2 10 2 15 2 13 3 10 3 9 3 6 4 7 4 27 4 9 4 7Solved1KViews0likes2CommentsSum data from 2 unrelated tables (key dates)
I have 2 tables, both have values separated by dates, I need to add these values by the dates shown. They do not have relationships in common, but are related to the dCalendar table. I tried to create a new table and use LOOKUPVALUE to generate the 2 values in a table and add them up ,but it still gives an error when the key provided has the date value I would like to know how can I add both values and separate them by dates The value highlighted in red would be the value that I must add, the value in blue would be the relations with the dCalendar tableSolved518Views0likes1CommentCopy value from one row to underlying rows
Hi all ! I have searched for a solution to this problem without luck - hopefully this issue is known to others: I have a table with date and transactions. The problem is that the date is not repeated on the rows - see example below. I am looking for the soluttion to copy the date and replace the "null" with date - until a new date is reached: My table: This should read: Thankful for any hint and suggestions ! Rgds Eirik BSolved2.8KViews0likes2CommentsUpdating table without losing previous rows
Hello everyone, I have sort of a problem, we have an access to goverment table showing EURIBOR interst rates, the downside of this table is that it only contains 10 rows, and after each refresh it keeps the 10 rows removing previous dates and adding new ones. So I was wondering is there any type of option inside PBI to update the table with new values by adding new rows and keeping older information?? And for our report we would need larger historical data and for that we would need this table to be updated with these new values by adding new rows instead of overwrighting the old values and keeping it in form of 10 rows only. I don't have much expirience with PBI we are primarly working with Tableau but we added PBI into our group and we want to use it properly, so if I need to clarify something just say what you need me to explain. Thanks in advance for any help!!!Solved2.2KViews0likes5CommentsHow to resume Returns and dates
Hi, I've a extensive database with the following format: Date Nemo Fund Rent 1/1/2021 Nemo1 A 1% 1/1/2021 Nemo1 B 1% 1/1/2021 Nemo1 C 1% 1/1/2021 Nemo2 A 7% 1/1/2021 Nemo2 D 7% 1/1/2021 Nemo3 A 0% 1/1/2021 Nemo3 B 0% 1/1/2021 Nemo3 C 0% 1/1/2021 Nemo3 D 0% 2/1/2021 Nemo1 A 0% 2/1/2021 Nemo1 B 0% 2/1/2021 Nemo1 C 0% 2/1/2021 Nemo2 A 0% 2/1/2021 Nemo2 D 0% 2/1/2021 Nemo3 A 0% 2/1/2021 Nemo3 B 0% 2/1/2021 Nemo3 C 0% 2/1/2021 Nemo3 D 0% 3/1/2021 Nemo1 A 0% 3/1/2021 Nemo1 B 0% 3/1/2021 Nemo1 C 0% 3/1/2021 Nemo2 A -3% 3/1/2021 Nemo2 D -3% 3/1/2021 Nemo3 A 0% 3/1/2021 Nemo3 B 0% 3/1/2021 Nemo3 C 0% 3/1/2021 Nemo3 D 0% 4/1/2021 Nemo1 A 7% 4/1/2021 Nemo1 B 7% 4/1/2021 Nemo1 C 7% 4/1/2021 Nemo2 A 3% 4/1/2021 Nemo2 D 3% 4/1/2021 Nemo3 A -9% 4/1/2021 Nemo3 B -9% 4/1/2021 Nemo3 C -9% 4/1/2021 Nemo3 D -9% I've daily returns for each nemotecnic in diferent fund (the nemos always have the same return in each fund per day, but not all funds have the same nemos). I would like to resume the returns != 0% with the date of that return someting like this: Nemo Rent1 Date1 Rent2 Date2 Rent3 Date3 Nemo1 1% 1/1/2021 7% 4/1/2021 Nemo2 7% 1/1/2021 -3% 3/1/2021 3% 4/1/2021 Nemo3 -9% 4/1/2021 Does anyone have a easy way to do this on Power BI?Solved814Views0likes2CommentsGetting values and filtering a virtual table
Hi all, I need to create a table inside the measure (not as another table) and get values from there. If I run as below, it works fine I see the table is Ok How to write an expression that works for specific columns? For example: MAX(_index[Value2) ... that will return 3.1 ... or FILTER(_index,[Value1] = 2 ... to select that specifc rowSolved2.1KViews0likes3Comments