query view
1 TopicWorking 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.3KViews0likes4Comments