Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello people this is my first post, i hope to get the answer for my question.
I have this SQL sentence:
with resultado as
(select top 12 *
from dbo.EVOL_SO_WXP
order by ID desc
union
select top 12 *
from dbo.EVOL_SO_W10
order by ID desc
union
select top 12 *
from dbo.EVOL_SO_W8
order by ID desc
union
select top 12 *
from dbo.EVOL_SO_W7
order by ID desc
union
select top 12 *
from dbo.EVOL_SO_W2000
order by ID desc
union
select top 12 *
from dbo.EVOL_SO_W2003
order by ID desc
union
select top 12 *
from dbo.EVOL_SO_W2008
order by ID desc
union
select top 12 *
from dbo.EVOL_SO_W2012
order by ID desc
)
select
ID,
[Sistema operativo],
Mes + ' ' + Año [Mes],
Total
from resultado order by ID
When I run this SQL sentence Power BI send me this error
But if I run the same Sentence in SQL Server it works, How can I fix this?
Thanks for the help!!!
Solved! Go to Solution.
Thanks for your help but I solve it, the solution was don't do that in DirectQuery mode, in Import mode I execute the Store Procedure and it works!!
Hey,
have a look here
https://community.powerbi.com/t5/Desktop/Custom-query-with-CTE-not-supported-bug/m-p/80522
,currently the usage of CTE is not supported Power BI
Two ways to circumvent this "limitation
My recommendation: 1.
Regards
Tom
Thanks for your help but I solve it, the solution was don't do that in DirectQuery mode, in Import mode I execute the Store Procedure and it works!!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 169 | |
| 109 | |
| 91 | |
| 55 | |
| 44 |