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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to calculate the average size of size list text in Direct Query mode

In short, Now I have a text column like                     //maybe more than 3 size pairs

"24x24 36x36 64x80"

Now I have to calculate the average width (24 + 36 +64) / 3   

 

further, I need to calculate how many square in the above text. (2)

 

Notice: I use direct query mode now.  

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

After testing, when you use the direct mode in Power query, many operations will be limited, it has the following limitation:

If the Power Query Editor query is overly complex, an error occurs. To fix the error, you must either delete the problematic step in Power Query Editor, or switch to import mode.you can refer to the following link.

https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-use-directquery#other-directquery-limitations

it's better that you change the mode to import, the import mode support all operations in Power Query.

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

I have try lots of methods.  And I found I can use #"Split Column by Delimiter" = Table.TransformColumns(#"Renamed Columns", {{"clean_sizes", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), let itemType = (type any) in type {itemType}}}),

 

to make the split result save to a list. But When Translate this list to a average number, it always remind me the step can't work in direct query mode.  It's so weird.   How to do that.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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