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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Husain
Advocate I
Advocate I

SampleMatrix Custom Visual doen't work

I am trying to run the the SampleMatrix Custom Visual frm Microsoft to learn about the Subtotals API availiable starting with the API 2.6.

 

However it doesn't work

 

https://github.com/microsoft/Powerbi-Visuals-SampleMatrix

 

When I run pbiviz start I get following

matrix error.png

 

@dm-p  
@jppp 

 

Could you help please?

 

 

 

 

1 ACCEPTED SOLUTION

Hi @Husain - yes, the SDK is a global install so any other projects may be impacted.

In these cases you'd need to reinstall the SDK you want to work with. It's a pain and a large reason why I can't assist on this issue more directly (as I have a huge v3 project that I'm working on at present that I can't deviate from).

This is a problem working with any visual prior to v3 of the SDK, as the API and SDK were bundled together.

For visuals developed on v3 or later the API and SDK are decoupled so it's easier to work across projects on different versions of the API, as you only need to install the necessary version of powerbi-visuals-api local to the project.

If you want to use the same SDK globally for all your projects and work with the sample, you would need to migrate the sample matrix project to support v3 SDK, (or ask MS to do it).

Regarding your follow-on error from the downgrade, if you've re-run npm i from the root of your project to ensure that all packages are correct following the downgrade, then this might need to be rasied as an issue on the repo, or you can try contacting pbicvsupport@microsoft.com to see if the team can assist.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

4 REPLIES 4
dm-p
Super User
Super User

Hi @Husain,

Did you follow the instructions in the repo about installing the correct version of powerbi-visuals-tools? From the error message in your screenshot, I would assume that you're attempting this on 3.1 or higher?

If so, you will need to install version 2.5 as per the linked instructions:

npm install -g powerbi-visuals-tools@2.5.0

Note that you will need to re-generate your certificate as this is matched to the version of the tools that you have installed. In versions prior to 3.1, this process is a 2-step process:

pbiviz --create-cert
pbiviz --install-cert

Good luck!

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Hi @dm-p 

 

I tried these steps. I get following error now

 

errorPBI.png

HI @dm-p 

 

When I downgrade and install cert

npm install -g powerbi-visuals-tools@2.5.0

 

My other custom visuals stop working and I get this message

$ pbiviz start
 info   Building visual...
 error  VALIDATION   Invalid API Version v3.5.0

 

Hi @Husain - yes, the SDK is a global install so any other projects may be impacted.

In these cases you'd need to reinstall the SDK you want to work with. It's a pain and a large reason why I can't assist on this issue more directly (as I have a huge v3 project that I'm working on at present that I can't deviate from).

This is a problem working with any visual prior to v3 of the SDK, as the API and SDK were bundled together.

For visuals developed on v3 or later the API and SDK are decoupled so it's easier to work across projects on different versions of the API, as you only need to install the necessary version of powerbi-visuals-api local to the project.

If you want to use the same SDK globally for all your projects and work with the sample, you would need to migrate the sample matrix project to support v3 SDK, (or ask MS to do it).

Regarding your follow-on error from the downgrade, if you've re-run npm i from the root of your project to ensure that all packages are correct following the downgrade, then this might need to be rasied as an issue on the repo, or you can try contacting pbicvsupport@microsoft.com to see if the team can assist.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.