Hello Everyone,
In Power BI, I have tried the with Rest api MDx query.
In GetData -> web-> in Advancced option, gave RestapiUrl to fetch the Dimension Element. It Worked well and pull the elemnts from TM1 with the 'GET' Request.
Now am trying with MDX POST request to fetch the cube data. AS I am new to power BI, I just want to know how the cube data looks in PowerBI.
But in fiddler it shows below error, contentType not supported. In ARC/POSTMan same is working fine.
My try: I gave contentType as application/json also. But same error.
Kindy provide your ideas/suggestions. Thanks.
Connect to Power BI using TM1 Rest api
-
- Community Contributor
- Posts: 180
- Joined: Sat May 05, 2018 11:48 am
- OLAP Product: tm1
- Version: 10.3.10100.8
- Excel Version: 14
-
- Site Admin
- Posts: 1457
- Joined: Wed May 28, 2008 9:09 am
Re: Connect to Power BI using TM1 Rest api
In your earlier thread https://www.tm1forum.com/viewtopic.php?f=3&t=15092 I and others said you should use TM1PY, since PowerBI can execute Python. IMO that is the best way forward unless you pony up for one of the many middleware products which do this job rather well.
-
- Community Contributor
- Posts: 180
- Joined: Sat May 05, 2018 11:48 am
- OLAP Product: tm1
- Version: 10.3.10100.8
- Excel Version: 14
Re: Connect to Power BI using TM1 Rest api
Yes true, I agree. But I am trying with TM1 Rest api with Web Connector. Just as a POC.
-
- Community Contributor
- Posts: 288
- Joined: Fri Feb 15, 2013 5:49 pm
- OLAP Product: TM1
- Version: PA 2.0.9.1
- Excel Version: 365
- Location: Minneapolis, USA
Re: Connect to Power BI using TM1 Rest api
Do you get the same error if you just pass "application/json" as the content type header instead of "application/json; charset=utf-8"?
-
- Community Contributor
- Posts: 180
- Joined: Sat May 05, 2018 11:48 am
- OLAP Product: tm1
- Version: 10.3.10100.8
- Excel Version: 14
Re: Connect to Power BI using TM1 Rest api
I have tried "application/json" as well, but end up with the same error.
-
- Community Contributor
- Posts: 180
- Joined: Sat May 05, 2018 11:48 am
- OLAP Product: tm1
- Version: 10.3.10100.8
- Excel Version: 14
Re: Connect to Power BI using TM1 Rest api
I have changed the Power BI syntax for the MDX query. Now query working well.
For the future reference, I am leaving the working query below.
let
url = "http://localhost:8000/api/v1/ExecuteMDX ... nal,Value)",
body = "{
""MDX"": ""SELECT {[}zPBI_Account].Members} on 0, {[}zPBI_Country].Members} on 1 FROM [zPBI_SalesCube] WHERE ([}zPBI_Model].[Model1], [}zPBI_Month].[J01])""
}",
Source = Json.Document(Web.Contents(url, [Headers=[#"Authorization"="Basic fasff", #"Content-Type"="application/json"]
])),
#"Source"
in
For the future reference, I am leaving the working query below.
let
url = "http://localhost:8000/api/v1/ExecuteMDX ... nal,Value)",
body = "{
""MDX"": ""SELECT {[}zPBI_Account].Members} on 0, {[}zPBI_Country].Members} on 1 FROM [zPBI_SalesCube] WHERE ([}zPBI_Model].[Model1], [}zPBI_Month].[J01])""
}",
Source = Json.Document(Web.Contents(url, [Headers=[#"Authorization"="Basic fasff", #"Content-Type"="application/json"]
])),
#"Source"
in