March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all, I am working on a power bi project where I need to develop multiple reports that has visuals like table, slicers kpis. WI am validating the data manually in the reports as of now like how many records are there in a table and among those how many were duplicated and I am keeping a summary about these all. Now I want to do these all automatically and at the end it will generate a report saying that total records are this much and these are the records that are duplicated for every option mentioned in a slicer. What are the techniques that are available to achieve this. Please give me the reply ASAP.
Hi @Kmanikanta ,
I recommend that you use Power Automate to export report to PDF or create report subscription. For report subscription, you can create subscription directly in the Service after publishing report to the Service. Email subscriptions for reports and dashboards in the Power BI service - Power BI | Microsoft Learn
Licenses: Power Automate license, Power BI Pro or PPU
Here's my test of creating a flow export report for your reference.
Original data.
Step1. Create measures for statistics.
Count = CALCULATE(COUNTROWS('Table'),ALL('Table'),'Table'[ID]=MAX('Table'[ID]))
Total = COUNTROWS(ALL('Table'))
Step2. Save and Publish report to Service.
Step3. Create Flow.
Best regards,
Mengmeng Li
hI @Kmanikanta
DAX has some useful functions which some can be used in a calculated table, some within the DAX query view.
For example COLUMNSTATISTICS() can return the list of columns in each table, the min and max values as well as the cardinality. INFO.VIEW functions can return calculated tables.
Proud to be a Super User!
Hi @Kmanikanta,
Automating data validation in Power BI involves leveraging DAX calculations, visuals, and possibly Power Query transformations to perform checks and generate a summary report. Here’s a structured approach to address your requirements:
1. Set Up the Data Validation Framework
Prepare the data for validation by identifying the key metrics you want to check, such as:
2. Identify and Handle Duplicates
2.1. Add a Duplicate Flag
Create a calculated column in Power BI to flag duplicates using DAX:
Duplicate Flag =Replace KeyColumn with the column or combination of columns that define uniqueness.
IF(
COUNTROWS(
FILTER(
TableName,
TableName[KeyColumn] = EARLIER(TableName[KeyColumn])
)
) > 1,
"Duplicate",
"Unique"
)
2.2. Count Duplicate Records
Create a measure to count duplicate records:
Duplicate Count =
CALCULATE(
COUNTROWS(TableName),
TableName[Duplicate Flag] = "Duplicate"
)
2.3. Count Total Records
Create a measure for the total record count:
Total Records = COUNTROWS(TableName)
3. Validate Data by Slicer Options
If you have slicers that filter data, you can create measures to validate the records dynamically based on slicer selections.
Example: Count Records for a Selected Slicer Option
If your slicer is based on a column like Category, you can create a measure:
Records by Slicer =
CALCULATE(
COUNTROWS(TableName),
ALLSELECTED(TableName[Category])
)
Similarly, you can create a measure for duplicate counts per slicer:
Duplicates by Slicer =
CALCULATE(
COUNTROWS(TableName),
TableName[Duplicate Flag] = "Duplicate",
ALLSELECTED(TableName[Category])
)
4. Generate Validation Report
Use the calculated measures to create a summary table or card visuals in the report:
Table Visual Example
Add a table visual with columns:
5. Optional: Automate Data Validation with Power Query
In Power Query, you can perform data validation and create a summary:
6. Enable Alerts for Validation Failures
Power BI allows conditional formatting. Use it to highlight anomalies:
7. Advanced Automation with Power Automate
If you want to schedule or trigger the validation process:
Let me know if you need help implementing any specific step!
I hope the provided solution works for you
If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.
Thanks for the solution, Could you please eloberate on automation with power automation with example.
Automate to automate data validation and report generation in Power BI:
Ensure your data is loaded into Power BI and is accessible. This could be from an Excel file, SQL database, or any other data source.
Condition: If the count of rows with the same unique identifier is greater than 1, mark as duplicate.
Here’s a simplified example of what the flow might look like:
By following these steps, you can automate your data validation process and generate reports automatically using Power Automate. If you need more specific details or have any questions, feel free to ask!
Please follow below link, here is a brief detail how to use validation in Power BI.
How to Use Data Validation in Power BI Dashboards for Accurate Insights | Poespas Blog
OR read below assumed solution:
You can create DAX measures to validate your data. For example, you can create measures to count total records, identify duplicates, and summarize these findings. Here’s a basic example:
TotalRecords = COUNTROWS('YourTable') DuplicateRecords = CALCULATE( COUNTROWS('YourTable'), FILTER( 'YourTable', COUNTROWS( FILTER( 'YourTable', 'YourTable'[ID] = EARLIER('YourTable'[ID]) ) ) > 1 ) )
Power Query can be used to clean and validate data before it is loaded into Power BI. You can create custom queries to check for duplicates, missing values, and other data quality issues.
Power Query has built-in data profiling tools that can help you understand the quality of your data. You can enable data profiling in the Power Query Editor to get insights into column distribution, value distribution, and more.
You can create a validation report in Power BI that includes visuals like tables and KPIs to display the results of your data validation measures. For example, you can create a table visual to list duplicate records and a KPI visual to show the total number of records.
Power Automate can be used to schedule and automate data validation processes. You can create a flow that refreshes your Power BI dataset and sends a summary report via email.
By following these steps, you can automate your data validation process and generate comprehensive reports in Power BI. For more detailed guidance, you can refer to resources like Esbrina’s blog on data validation with Power BI and Poespas’ blog on using data validation in Power BI dashboards12.
If you have any specific questions or need further assistance, feel free to ask!
Thanks for the solution, Could you please eloberate on automation with power automate with example.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |