Forum Discussion
DAX For Weighted Column
Hello, I am looking to create a weighted calculation of data quality in the organization.
The data consits of the following columns:
Application
Data Quality Attribute
Data Subject Area
Business Usage
Violation Record ID
Violation Source Count
Source Column
Source Column Weight
The formula for Weighted Violations
SUM(For every column calculate the source column weight, * distinct count of violation record id)
Expected Output: Numerator
Filters: Everything is set to all
| Column | Column Weight | Distinct Count of Entities | Product of Weight * Entities | |
| A | 8 | 3 | 24 | |
| B | 8 | 2 | 16 | |
| C | 2 | 2 | 4 | |
| D | 4 | 2 | 8 | |
| E | 8 | 2 | 16 | |
| F | 1 | 1 | 1 | |
| G | 2 | 1 | 2 | |
| H | 1 | 1 | 1 | |
| J | 1 | 1 | 1 | |
| 73 | Expected Output |
Filters: ScoreCard A is chosen
| Column | Column Weight | Distinct Count of Entities | Product of Weight * Entities | |
| A | 8 | 3 | 24 | |
| C | 2 | 2 | 4 | |
| D | 4 | 2 | 8 | |
| F | 1 | 1 | 1 | |
| H | 1 | 1 | 1 | |
| 38 | Expected Output |
I have attached a link of power bi file and dummy data.
https://www.dropbox.com/s/zids3ejrkkijb6i/attachments.zip?dl=0
This needs to work when select all is selected.
9 Replies
- Ashish_MathurSuper User
Hi,
Your question is not clear. In a simple Table, please show the expected result on the data that you have shared.
- AnonymousNot applicable
Ashish_Mathur I have added the requested information.
- Ashish_MathurSuper User