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
Kinley1
Frequent Visitor

power query

Hi all, can you help me please.

I am trying to use calculated column to show latest month report when they upload the new .xlsx files in my sharepoint folder online.

 

Latest Month = 'Sample'[Date] = CALCULATE(
    MAX('Sample'[Date])
    , FILTER(ALL('Sample')
    , 'Sample'[Country] = EARLIER('Sample'[Country]))
)
 
But I am unable to find my table. It always shows this error: " Cannot find table 'Sample'. 
I am trying to map Date with Country column
3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Kinley1 

 

In which table did you add this calculated column? Do you have a table named as "Sample" in your model?

 

If you have a table named as "Sample" and add a calculated column in this table, you will have below result. Is this what you want? Please note that this formula is DAX formula not Power Query. 

vjingzhang_0-1673934661932.png

 

If you want to load data from a sharepoint folder, please refer to Combining Excel Files hosted on a SharePoint folder with Power BI | Microsoft Power BI Blog

 

If you only want to load data from the newest file into your model, you need to filter that in Power Query Editor. After that, you have to refresh data to import the latest data from the sharepoint folder. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Kinley1
Frequent Visitor

Hello @Idrissshatila 

 

Query still cannot find my sharepoint online folder 'Sample'. The error reads "Cannot find table 'Sample'"

 

Is there any way to how we put sharepoint folder in the power queries 

Idrissshatila
Super User
Super User

Hello @Kinley1,

 

try it like this:

 

Latest Month = CALCULATE(
MAX('Sample'[Date])
, FILTER(ALL('Sample')
, 'Sample'[Country] = EARLIER('Sample'[Country]))
)

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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
Top Kudoed Authors