Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
Please help if all possible.
I want to get the average of 6 different measures. If one of the 6 measure is blank, then it should divide by 5. If 2 of 6 measures is blank, then it should divide by 4, etc. I only want the average of the measures that is nonblank.
In the snippet below: i need it to take the average of 4 since 2 are blank.
please please help
Put the measures into a list and use AVERAGEX.
AVERAGEX ( { [ADF], [CR], [London], [Manual], [Pcard], [SNOW] }, [Value] )
Note: Technically, using { ... } creates a single-column table with the default column name "Value".
Thank you for your response @AlexisOlson . Your measure did not seem to work but i figured it out below measure. thanks again.
Hmm. I wonder why it's not working for you. Does this version work?
Average_Productivity =
VAR MeasureList = {
[TOTAL_ADF_PRODUCTIVITY],
[TOTAL_CR_PRODUCTIVITY],
[TOTAL_Manual_Entries_PRODUCTIVITY],
[TOTAL_SNOW_PRODUCTIVITY],
[TOTAL_LondonTax_PRODUCTIVITY],
[TOTAL_Pcards_PRODUCTIVITY]
}
VAR NonBlankValues =
FILTER ( MeasureList, NOT ( ISBLANK ( [Value] ) ) )
RETURN
AVERAGEX ( NonBlankValues, [Value] )
User | Count |
---|---|
84 | |
77 | |
64 | |
51 | |
46 |
User | Count |
---|---|
101 | |
43 | |
39 | |
39 | |
36 |