Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Experts,
I am trying to derive "Average CSAT per skill" from below two tables using DAX.
Table 1 | |
DATE | SKILL |
1/02/2020 | Skill 2 |
1/02/2020 | Skill 3 |
1/02/2020 | Skill 1 |
2/02/2020 | Skill 2 |
2/02/2020 | Skill 3 |
2/02/2020 | Skill 1 |
3/02/2020 | Skill 2 |
3/02/2020 | Skill 3 |
3/02/2020 | Skill 1 |
4/02/2020 | Skill 2 |
4/02/2020 | Skill 3 |
4/02/2020 | Skill 1 |
5/02/2020 | Skill 2 |
5/02/2020 | Skill 3 |
5/02/2020 | Skill 1 |
Table 2 | ||
Date | Skill Name | Type |
3/02/2020 | Skill 2 | CSAT |
3/02/2020 | Skill 2 | CSAT |
3/02/2020 | Skill 2 | CSAT |
3/02/2020 | Skill 2 | CSAT |
3/02/2020 | Skill 2 | CSAT |
3/02/2020 | Skill 3 | CSAT |
3/02/2020 | Skill 3 | CSAT |
3/02/2020 | Skill 3 | CSAT |
3/02/2020 | Skill 3 | CSAT |
3/02/2020 | Skill 3 | CSAT |
3/02/2020 | Skill 1 | CSAT |
3/02/2020 | Skill 1 | CSAT |
3/02/2020 | Skill 1 | CSAT |
3/02/2020 | Skill 1 | CSAT |
3/02/2020 | Skill 1 | CSAT |
2/02/2020 | Skill 2 | CSAT |
2/02/2020 | Skill 2 | CSAT |
2/02/2020 | Skill 2 | CSAT |
2/02/2020 | Skill 2 | CSAT |
2/02/2020 | Skill 2 | CSAT |
2/02/2020 | Skill 3 | CSAT |
9/02/2020 | Skill 2 | Alternate contact |
9/02/2020 | Skill 2 | Alternate contact |
9/02/2020 | Skill 2 | Alternate contact |
9/02/2020 | Skill 2 | Alternate contact |
9/02/2020 | Skill 2 | Alternate contact |
10/02/2020 | Skill 3 | Open feedback |
11/02/2020 | Skill 3 | Open feedback |
11/02/2020 | Skill 3 | Open feedback |
12/02/2020 | Skill 1 | Open feedback |
12/02/2020 | Skill 1 | Open feedback |
12/02/2020 | Skill 1 | Open feedback |
The CSAT is weighted as follows :-
Score 5 = 1, Score 4 = 0.75, Score 3 = 0.5, Score 2 = 0.25, Score 1 = 0
The idea is to derive CSAT is looking at if the responses are as per below;
1 – 5 (5*0) = 0
2 – 1 (1*0.25) = 0.25
3 – 2 (2*0.5) = 1
4 – 13 (13*0.75) = 9.75
5 – 79 (79*1) = 79
So CSAT is 90/100.
It would be great if you could help me with this problem. I am unable to found a correct way to derive the calculation.
Kind regards
Solved! Go to Solution.
First, you need to filter out the rows in Table 2 that are of type "CSAT". Then, you'll want to count the number of occurrences of each score for each skill. Once you have these counts, you can multiply them by their respective weights to get the weighted score for each skill. Finally, you'll sum up these weighted scores and divide by the total number of CSAT responses to get the average CSAT per skill.
Here's a DAX formula that should help you achieve this:
Average CSAT per Skill =
VAR CSATTable = FILTER(Table2, Table2[Type] = "CSAT")
VAR Score5Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 5))
VAR Score4Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 4))
VAR Score3Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 3))
VAR Score2Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 2))
VAR Score1Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 1))
VAR WeightedScore =
(Score5Count * 1) +
(Score4Count * 0.75) +
(Score3Count * 0.5) +
(Score2Count * 0.25) +
(Score1Count * 0)
VAR TotalCSATResponses = Score5Count + Score4Count + Score3Count + Score2Count + Score1Count
RETURN
IF(TotalCSATResponses = 0, BLANK(), WeightedScore / TotalCSATResponses)
This formula first creates a table with only the CSAT responses. It then counts the number of each score and calculates the weighted score. Finally, it divides the weighted score by the total number of CSAT responses to get the average CSAT per skill.
First, you need to filter out the rows in Table 2 that are of type "CSAT". Then, you'll want to count the number of occurrences of each score for each skill. Once you have these counts, you can multiply them by their respective weights to get the weighted score for each skill. Finally, you'll sum up these weighted scores and divide by the total number of CSAT responses to get the average CSAT per skill.
Here's a DAX formula that should help you achieve this:
Average CSAT per Skill =
VAR CSATTable = FILTER(Table2, Table2[Type] = "CSAT")
VAR Score5Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 5))
VAR Score4Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 4))
VAR Score3Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 3))
VAR Score2Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 2))
VAR Score1Count = COUNTROWS(FILTER(CSATTable, CSATTable[Score] = 1))
VAR WeightedScore =
(Score5Count * 1) +
(Score4Count * 0.75) +
(Score3Count * 0.5) +
(Score2Count * 0.25) +
(Score1Count * 0)
VAR TotalCSATResponses = Score5Count + Score4Count + Score3Count + Score2Count + Score1Count
RETURN
IF(TotalCSATResponses = 0, BLANK(), WeightedScore / TotalCSATResponses)
This formula first creates a table with only the CSAT responses. It then counts the number of each score and calculates the weighted score. Finally, it divides the weighted score by the total number of CSAT responses to get the average CSAT per skill.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |