How To Schedule and Automate Power BI DAX Queries Using remiCrystal
If you regularly run Power BI DAX queries for reports or integrations, automating them can save hours of manual work.
With remiCrystal, you can schedule DAX queries to execute automatically, refresh datasets before exporting, and deliver results in multiple formats — without writing PowerShell scripts or using the REST API directly.
This guide walks you through how to connect Power BI to remiCrystal, authenticate via Azure Active Directory, and configure scheduled DAX query exports.
Step 1: Register remiCrystal in Azure
Before remiCrystal can access your Power BI datasets, you’ll need to register it as an application in Azure Active Directory (AAD).
Sign in to the Azure portal
Use an account with administrative privileges.Open App registrations
Search for “App registrations” in the Azure search bar or locate it under Azure Active Directory.Create a new registration
Click + New registration.Enter application details
Name: For example, Power BI Integration App.
Supported account types: Choose Accounts in this organizational directory only for most setups.
Redirect URI (optional): Set the type to Web and enter the URL where Power BI should redirect after authentication.
Register the application
Click Register, then copy the Application (client) ID and Directory (tenant) ID. You’ll use these later in remiCrystal.Configure API permissions
Go to API permissions → Add a permission → Power BI Service.
Select the following permissions:
Dataset.ReadWrite.AllReport.ReadWrite.AllWorkspace.ReadWrite.All
Click Add permissions, then Grant admin consent.
Create a client secret
Go to Certificates & secrets → New client secret.
Add a description, choose an expiration period, and click Add.
Copy the generated secret — it’s only displayed once. Store it securely.
Step 2: Add a Power BI Account in remiCrystal
Next, link your Power BI credentials to remiCrystal:
Launch remiCrystal from the Windows Start menu.
Click Options in the main menu.
Navigate to the Power BI tab.
Click Add.
In the Power BI Account window:
Provide a name for the account.
Enter the client ID, tenant ID, and client secret from Azure.
Click Validate to test the connection and retrieve a refresh token.
Click Save to finalize the account setup.
Step 3: Configure and Schedule a DAX Query Export
Once your account is set up, you can configure a DAX query export task:
Open the Reports & Actions tab in remiCrystal.
Click DAX Query.
Choose your Power BI account, Workspace, and Dataset.
Enter the DAX query you want to run.
Select the Output Format — such as Excel, CSV, JSON, XML, or PDF.
Click Save to store the configuration.
Bonus: Refresh the Dataset Before Export
For maximum accuracy, you can configure remiCrystal to refresh your Power BI dataset before running the query.
This ensures your exported data always reflects the most recent updates from your source systems.
Why Automate DAX Queries with remiCrystal?
Time savings: Automate repetitive DAX queries and eliminate manual refreshes.
Data accuracy: Always export the most current dataset.
Integration-ready: Output in multiple formats for ERP, CRM, or analytics platforms.
Security: Use Azure AD authentication and service principals — no personal credentials.
Scalability: Schedule multiple queries across different workspaces and datasets.
Comments
0 comments
Article is closed for comments.