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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SBR1D
Helper III
Helper III

CALCULATETABLE returns error " a table of multiple values was supplied where single value expected"

Hi All

 

The following code is returning the error in the title but i've only specified one column so i don't know why?

 

 

lapsed employers v2 = VAR LAPSEDTBL = CALCULATETABLE(SUMMARIZE('Learning Plan','Learning Plan'[Employer Name]),
'Learning Plan'[Status Desc]= "In Progress")
RETURN
 CALCULATETABLE(SUMMARIZE( 'Learning Plan','Learning Plan'[Employer Name]),                                                                                                                                                                                
NOT 'Learning Plan'[Employer Name] IN LAPSEDTBL)  

 

1 ACCEPTED SOLUTION

pls try this

Table1 lapsed employers v2 =
VAR LAPSEDTBL =
    
        SUMMARIZE ( 
                    CALCULATETABLE ('Learning Plan','Learning Plan'[Status Desc] = "In Progress")
                       , 'Learning Plan'[Employer Name] )
RETURN
    
        SUMMARIZE ( 
            CALCULATETABLE ('Learning Plan',NOT 'Learning Plan'[Employer Name] IN LAPSEDTBL)
               'Learning Plan'[Employer Name] )
-----------------
or 
Table2 lapsed employers v2 =
VAR LAPSEDTBL =
    
        SUMMARIZE ( 
                    FILTER ('Learning Plan','Learning Plan'[Status Desc] = "In Progress")
                       , 'Learning Plan'[Employer Name] )
RETURN
    
        SUMMARIZE ( 
            FILTER ('Learning Plan',NOT 'Learning Plan'[Employer Name] IN LAPSEDTBL)
               'Learning Plan'[Employer Name] )

View solution in original post

5 REPLIES 5
SBR1D
Helper III
Helper III

Thank you that works great.

Ahmedx
Super User
Super User

or 
Table2 lapsed employers v2 =
VAR LAPSEDTBL1 =
    
        SUMMARIZE ( 
                    FILTER ('Learning Plan','Learning Plan'[Status Desc] = "In Progress")
                       , 'Learning Plan'[Employer Name] )
VAR LAPSEDTBL2 = SUMMARIZE ( FILTER ('Learning Plan','Learning Plan'[Employer Name] )
RETURN
    
        EXCEPT(LAPSEDTBL2,LAPSEDTBL1)
Ahmedx
Super User
Super User

this returns a table, but not a scolar value. that's why the error comes out

what do you want to receive?

Thanks for the quick reply. I want to see a the emploeyer names not in LAPSEDTBL.  I thought a calculatedtable would be fine for that or can you not use calculatedtable with return?

pls try this

Table1 lapsed employers v2 =
VAR LAPSEDTBL =
    
        SUMMARIZE ( 
                    CALCULATETABLE ('Learning Plan','Learning Plan'[Status Desc] = "In Progress")
                       , 'Learning Plan'[Employer Name] )
RETURN
    
        SUMMARIZE ( 
            CALCULATETABLE ('Learning Plan',NOT 'Learning Plan'[Employer Name] IN LAPSEDTBL)
               'Learning Plan'[Employer Name] )
-----------------
or 
Table2 lapsed employers v2 =
VAR LAPSEDTBL =
    
        SUMMARIZE ( 
                    FILTER ('Learning Plan','Learning Plan'[Status Desc] = "In Progress")
                       , 'Learning Plan'[Employer Name] )
RETURN
    
        SUMMARIZE ( 
            FILTER ('Learning Plan',NOT 'Learning Plan'[Employer Name] IN LAPSEDTBL)
               'Learning Plan'[Employer Name] )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.