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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
saltyfish
Regular Visitor

Calculated table edit queries option not availalbe

Hello,

 

I have a calcualted table that I would like to merge with another table, but Edit Queries option is not available when I right click on the table.  Am I missing anything?

 

 

Shawn

11 REPLIES 11
Sean
Community Champion
Community Champion

Can you post a screenshot of what you are looking at?

StoreMonthlyNetSales is a calcuated table.  As you can see from the screenshot below, Edit Queries option is not available.

Screen Shot 2016-04-19 at 12.23.08 PM.png

Sean
Community Champion
Community Champion

You are not in the Query Editor!

Query Editor.png

This will open the Query Editor in a New Window!

Query Editor2.png

 

I'm in Query Editor, and the table is not there!

 

Screen Shot 2016-04-19 at 12.56.19 PM.png

Sean
Community Champion
Community Champion

Ok I see now in the first screenshot you posted the cells of the table icon are actually shaded a bit blue/gray...

 

You've created this table in PBI to most likely assist in a calculation.

 

This is from a Test File...

PBI Created Table.png

 

You should have the data in that table in another Query though.

 

Can you tell us why you want to merge that table with a query?

 

If you use the Query editor (and it's M-language) for creating columns or additional tables (queries) they can then further be referenced in the query editor and the table view.

 

But it you create your calculated columns or table in the table view (using DAX) they can only be used in the table view. So this is a one-way-street.

 

This can be a bit confusing for beginners and raise the question why the left the option in DAX. An advantage of using the DAX-version is speed at loading for certain calculations.But you pay the price of not being able to reference those items (back) in the query-editor. 

 

So you need to rebuild that table in the query editor (using M) if you need to reference it there. 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Sean
Community Champion
Community Champion

@ImkeF I just don't get why he needs to merge this DAX created table (which seems to be aggregation of the Daily Sales table to Monthly level) with a Query? (If he aggregates to Annual Sales would he then want to merge that one too?) What's the purpose?

@Sean Agree, I don't get it either and my post wasn't meant to question anything said so far. Actually, I don't have time at the moment to dive into detailed questions like you helpfully raised 🙂

 

Just thought it could be helpful to quickly stress out the underlying principles: Think ahead before creating helper tables in the wrong place.

 

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Sean
Community Champion
Community Champion

@ImkeF Actually I'm glad you repsonded and clarified this because I wasn't 100% sure - it's a one way street.

 

I suspected it was... but with all the Magic I've seen you do with M... you never know...Smiley Very Happy

@ImkeF

Out of curiousity how do you build a similar table in M? I have a similar situation where I've created a table with DAX and on my to-do list is to rebuild as suggested. 

Is there an easy way to create an M formula or would I have to use the Query Editor interface to transform my original table again? 

My DAX is:

Unique AM2 = 
    ADDCOLUMNS(
        SUMMARIZE(
            'AM2', 
            [Order ID]
        ),
       "Word Count", CALCULATE(MAX('AM2'[Word Count])),
       "Fee", CALCULATE(MAX('AM2'[Academic Fee])),
       "First Date", CALCULATE(MIN('AM2'[Assigned Date])) 
)

Thanks. 

There is no translator available at the moment who would automatically translate DAX-statements to M. So you would have to do it in the query editor.

 

In this case it is just one dialogue: Group by (check Order ID to group by and the other cols as new cols with their respective aggregation operations (MAX, MIN).

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors