Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am trying to create a calculation, that takes in a column and outputs a value that I am going to later use to average all the values from all those columns. Issue is I have 9 columns and it seems like a not-so-optimized solution to rewrite the code again and again. Is there any way I can pass value in the function and based on those values returned from that function, create average score.
This is my code for one column, lets say we have 9 more columns like this e.g pace, moderation etc
Hi @Anonymous
please try
LSAT_Confidence Score demo =
VAR sum_of_counts =
COUNTROWS ( FILTER ( 'nps', 'nps'[Confidence boosting] IN { 7, 8, 9, 10 } ) )
VAR sum_of_all_counts =
COUNTROWS (
FILTER (
'nps',
'nps'[Confidence boosting] IN { 0, 1, 2, 3, 4, 5, 7, 8, 9, 10 }
)
) -- if there are no numbers other than 0 - 10 then it can be 'nps'[Confidence boosting] <> blank ()
VAR LSAT_Score = ( sum_of_counts / sum_of_all_counts ) * 100
RETURN
IF ( ISBLANK ( LSAT_Score ), 0, LSAT_Score )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
12 | |
11 | |
7 | |
7 |
User | Count |
---|---|
16 | |
13 | |
11 | |
11 | |
9 |