Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SidArt0731
Frequent Visitor

Working 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 Video
2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

It;s a known limitation/bug. DAX Query View only works if you include at least one artifact from the existing data model.

View solution in original post

h21
Helper I
Helper I

It is not mention clearly in the below link that "DAX Evaluate queries work only on databases which have at least one tables."

DAX query view in Power BI Desktop - Power BI | Microsoft Learn 
But for now it is limitation, that DAX Query View only works if we inculde atleast on entity/table. 

It is not necessary to mention any artifact from existing data model.

I hope you find it helpful.
Thanking You!

View solution in original post

4 REPLIES 4
h21
Helper I
Helper I

It is not mention clearly in the below link that "DAX Evaluate queries work only on databases which have at least one tables."

DAX query view in Power BI Desktop - Power BI | Microsoft Learn 
But for now it is limitation, that DAX Query View only works if we inculde atleast on entity/table. 

It is not necessary to mention any artifact from existing data model.

I hope you find it helpful.
Thanking You!

lbendlin
Super User
Super User

It;s a known limitation/bug. DAX Query View only works if you include at least one artifact from the existing data model.

Hi,
I'm already going through the documentation (Query View). Can you please provide some kind of citation?

Ask Zoe or Amanda.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors