Coder Social home page Coder Social logo

powerbi_desktop_export_csv's Introduction

PowerBI_Desktop_Export_CSV

a Powershell script to query and export a CSV from Power BI Desktop
download the ssas.ps1
right click the file in windows, then open
edit $query = “evaluate Table1”, write a dax query that refer to your model, then save
right click the file in windows, then run with PowerShell, make sure only one Instance of PowerBI desktop is running.
a new file “tofile.csv” will be generated
it seems SSAS embeded with PowerBI desktop is configured to time out after 30 Seconds, so if you are trying to export very large datasets try to do the export by a smaller chunck, I test it with a 3 Mi tables and it does work

Another option is to use SQL_AS_ADOMD 2016, YOU CAN DOWNLOAD IT FROM HERE
https://www.microsoft.com/en-us/download/details.aspx?id=52676
Use this script ADOMD.PS1, it should work with bigger export, but you need admin right to install the new driver.

USE CASES

PowerQuery does not Export to CSV, it become an issue when the result of the transformation is > 1 Mil, the workaround is to copy the Query in Power BI desktop and export to csv using the current script.

an interesting use case if you are working with MS Access ,SQL Server express or SQLITE, you can use PowerBI desktop as an ETL tool :)

if you are on windows 7, you need first to start the script PS, see more details here http://stackoverflow.com/questions/2094694/how-can-i-run-powershell-with-the-net-4-runtime?noredirect=1&lq=1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.