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 Community !
As my BI-experiences are more with other tools than PowerBI, I am struggling on this one as I think it should work somehow:
I do have two tables:
Data
DataID | Column2 | Column3 | Column4 |
1 | Text123 | <null> | Text789 |
2 | <null> | Text456 | Text789 |
Scoring
ScoringID | DataColumn | Score |
1 | Column2 | 10 |
2 | Column3 | 5 |
3 | Column4 | 20 |
My issue:
I want to apply a scoring for DataQuality for one of my tables.
Meaning: I have a defined Scoring table applying a score per specific column that should be applied if the datafield is not null.
Based on the example posted, DataID 1 will have a score of 30, while DataID 2 should have a scoring of 25.
So I at least think, that I need something like
if(Data.ColumnName() = [Scoring].[DataColumn], if(isnull([Data].[Column2]),0,1)*[Scoring].[DataColumn])
However, I am stuck due to the lack of PowerBI knowledge as I do not know where exactly to apply and as well how to get this comparision with the field name.
Hope someone can help me out here 🙂
Also, if there are any other or built-in options to do this - very appreciated!
Solved! Go to Solution.
Hello @CoTheiss
You can create a calculated column in your Data Table as
--------------------------------------------------------------------------------------------------
Also you can achive this by unpivoting Data table col1, col2, col3 in advance editor.
After that you need to merge data table and score table on column "Datacolumn".
After merging your Data table look like this, then you can aggregate the data or create measure to get your desired result.
Regards,
Novil
If I answer your question, please mark my post as a solution.
Hello @CoTheiss
You can create a calculated column in your Data Table as
--------------------------------------------------------------------------------------------------
Also you can achive this by unpivoting Data table col1, col2, col3 in advance editor.
After that you need to merge data table and score table on column "Datacolumn".
After merging your Data table look like this, then you can aggregate the data or create measure to get your desired result.
Regards,
Novil
If I answer your question, please mark my post as a solution.
Hi @PawarNovil
I just tried the first approach with the calculated column and it works!
I also learned, that having a datafield with len(Field)=0 does not neccessarily equals blank() - as I needed to adapt the formula to if('Data'[Column2]="",...)
I did not try the second approach (yet) as the first one was sufficient already (and my dataset is quite wide and long)
@CoTheiss Looks to me like this is only possible when you transpose Table Data:
using DataColumn as key between Data Table and Scoring Table.
BBF
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
25 | |
18 | |
15 | |
9 | |
8 |
User | Count |
---|---|
37 | |
32 | |
18 | |
16 | |
13 |