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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Copied DAX expression does not work

Dear community, hopefully one of you can help me out with the issue I am currently dealing with.

 

first a bit of context;

 

I am recreating a power BI report from an example, that contains a data table, a date table, and a measures table.

the data table contains personnel information, and consists of "closing" count of employees and "opening" count of employees. It shows at a given month what the amount of personnel was at the start of the month (opening), versus at the end of the month (closing).

 

the measures table will consist of 2 measures; how many "opening" workers vs. how many "closing" workers. In the example the formulas are;

 

ClosingWorkers = CALCULATE(count('Headcount development and turnover (2)'[Person Number]), 'Headcount development and turnover (2)'[Status] = "Closing")
 and 
OpeningWorkers = CALCULATE(count('Headcount development and turnover (2)'[Person Number]), 'Headcount development and turnover (2)'[Status] = "Opening")
 

All went well untill I tried to copy the DAX formula from the measures table. I receive the error:

 

"The expression specified in the query is not a valid table expression."

 

Which is strange, because everything is correct according to the example file. and CALCULATE and COUNT are both expressions accepted by Power BI. Does anyone know why this error might occur? My suspision is that it has something to do with the difference in settings or installations, but I am far from an expert. 

 

I am looking forward to your replies, many thanks in advance!

 

Kind regards,

 

Robin

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Did you paste this into a calculated Table expression instead of a measure expression?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous Did you paste this into a calculated Table expression instead of a measure expression?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.