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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
JaromG
Frequent Visitor

Error M Code: Missing Module Reference

I want to get a distinct list of clients. (Steps Source Through ListOfClientKeys){

Then I want to pass that list into an analysis service query (Step "Client")

Revenue Details is another table in my model that processes fine. It has a column called Client Key.  

 

I am receiving this error:

<ccon>The import Revenue Details matches no exports. Did you miss a module reference?</ccon>

 

Please help me figure out how to resolve this error! Kind regards. 

 

let
    Source = #"Revenue Details"[Client Key],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Client Key", type text}}),
    ClientKey = #"Changed Type"[Client Key],
    ListOfClientKeys = Text.Combine(ClientKey,","),

    Clients = AnalysisServices.Database(SSASServer, "tabularModel", [Query=
                    "DEFINE

                    VAR _ClientKeysInSnapshot =
                        TREATAS ( {"& ListOfClientKeys &"}, D_Client[ClientKey])
                        
                    VAR _FinalProduct = 
                    SummarizeColumns(D_Client[Global Client Name],
                        D_Client[ClientID],
                        D_Client[ClientKey],
                        D_Client[ClientName],
                        D_Client[Global Management Niche],
                        _ClientKeysInSnapshot)
                
                EVALUATE
                _FinalProduct", Implementation="2.0", CommandTimeout=#duration(0, 0, 120, 0)]),
    #"Renamed Columns" = Table.RenameColumns(Clients,{{"D_Client[Global Client Name]", "Global Client Name"}, {"D_Client[ClientID]", "Client ID"}, {"D_Client[ClientKey]", "Client Key"}, {"D_Client[ClientName]", "Client Name"}, {"D_Client[Global Management Niche]", "Global Management Niche"}}),
    #"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each not Text.StartsWith([Client ID], "OAM.NT") and not Text.EndsWith([Client ID], "-HF"))
in
    #"Filtered Rows"

 

JaromG_0-1692022702653.png

 

1 REPLY 1
lbendlin
Super User
Super User

As the message says - you use "Revenue Details" without specifying what data source sits behind that. Power Query cannot infer that you want to pull this data from a cube. You have to use the same AnalysisServices.Database connector as you do later on for your DAX query.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors