Showing posts with label #lastmonthpowerbi. Show all posts
Showing posts with label #lastmonthpowerbi. Show all posts

Thursday, January 23, 2025

CI/CD pipeline for Power BI deployments

 A CI/CD pipeline for Power BI deployments is an automated process that streamlines the development, testing, and deployment of Power BI reports and dashboards across different environments (like development, testing, and production) by using tools like Azure DevOps to manage the workflow, ensuring consistent quality and minimizing manual intervention throughout the deployment process. 


Key components of a Power BI CI/CD pipeline:

  • Source Control:
    Storing Power BI PBIX files in a version control system like Git to track changes and manage different versions. 
  • Build Stage:
    • Validation Checks: Performing quality checks on Power BI files, such as data connectivity, data quality, and report layout. 
    • Packaging: Creating a deployment package containing the Power BI content ready for deployment. 
  • Test Stage:
    • Unit Testing: Running automated tests on individual components of the Power BI report (e.g., visuals, calculations) to identify issues early. 
    • User Acceptance Testing (UAT): Providing a controlled environment for end-users to test the functionality and usability of the Power BI content. 
  • Deployment Stage:
    • Environment Management: Deploying the Power BI content to different environments (development, staging, production) based on the pipeline stage.
    • Permissions Management: Assigning appropriate user access levels to Power BI workspaces and content based on the environment. 
  • Benefits of using a CI/CD pipeline for Power BI deployments:
    • Faster Time to Market:
      Streamlines the deployment process, allowing quicker delivery of Power BI reports and updates to users.
    Improved Quality:
    • Automated testing catches errors early in the development cycle, leading to higher quality deployments.
    Reduced Manual Effort:
    • Automates repetitive tasks, freeing up developers to focus on more complex aspects of Power BI development.
    Traceability:
    • Provides a clear audit trail of changes made to Power BI content and who made them. 
    Tools to implement a Power BI CI/CD pipeline:
    • Azure DevOps:
      A comprehensive platform with built-in features for CI/CD pipelines, including the ability to manage Power BI deployments.
    Power BI REST API:
    • Can be used to programmatically interact with Power BI service to automate deployment tasks. 
    Power BI Embedded:
    • For integrating Power BI content into custom applications, enabling more granular control over deployment. 

    Monday, September 10, 2018

    PREVIOUS Day/Month/Year Calculations in Dax/ Power BI

    PREVIOUS Day/Month/Year Calculations in Dax:

    PREVIOUSDAY Function (DAX)


    Returns a table that contains a column of all dates representing the day that is previous to the first date in the dates column, in the current context.

    Syntax

    PREVIOUSDAY(<dates>)  
    

    Parameters

    TermDefinition
    datesA column containing dates.

    Return Value

    A table containing a single column of date values.
    Example: 
    =CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), PREVIOUSDAY('DateTime'[DateKey]))  
    

    PREVIOUSMONTH Function (DAX)



    Returns a table that contains a column of all dates from the previous month, based on the first date in the dates column, in the current context.

    Syntax

    PREVIOUSMONTH(<dates>)  
    

    Parameters

    TermDefinition
    DatesA column containing dates.

    Return Value

    A table containing a single column of date values.
    Example:
    =CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), PREVIOUSMONTH('DateTime'[DateKey]))  
    

    PREVIOUSQUARTER Function (DAX):

    Returns a table that contains a column of all dates from the previous quarter, based on the first date in the dates column, in the current context.

    Syntax

    PREVIOUSQUARTER(<dates>)  
    

    Parameters

    TermDefinition
    datesA column containing dates.

    Return Value

    A table containing a single column of date values.
    Example: =CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), PREVIOUSQUARTER('DateTime'[DateKey]))

    PREVIOUSYEAR Function (DAX):



    Returns a table that contains a column of all dates from the previous year, given the last date in the dates column, in the current context.

    Syntax

    PREVIOUSYEAR(<dates>[,<year_end_date>])  
    

    Parameters

    TermDefinition
    datesA column containing dates.
    year_end_date(optional) A literal string with a date that defines the year-end date. The default is December 31.

    Return Value

    A table containing a single column of date values.
    Ex: =CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), PREVIOUSYEAR('DateTime'[DateKey]))
    More date and Time functions can be obtained from the link below:
    https://msdn.microsoft.com/en-us/query-bi/dax/date-and-time-functions-dax
    More of Time Intelligence functions:
    https://msdn.microsoft.com/en-us/query-bi/dax/time-intelligence-functions-dax