Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I created a measure that calculates an average from answers on a survey. Each survey was submitted on a different date and they are all stored in the Survey table. This measure calculates average of answers from particular questions from each type of survey.
Now, I want to create a new table with the following columns:
-Month (Jan, Feb, Mar etc)
-AverageCurrentMonth -average of answers from the measure for coresponding month
-AverageLastMonth - average of answers from the measure per last month (so that I can compare this in my KPI table)
This is the measure I am trying to use in the calculated column. It's made up of smaller measures.
@Anonymous ,
This error message means that the datatype should be explicit in the calculate column. You should not define uncertain datatype, change "N/A" with BLANK() and try again.
Project Management =
VAR Count_ =
IF ( [Project M ESC Q1] <> BLANK (), 1, 0 )
+ IF ( [Project M FSR Q1] <> BLANK (), 1, 0 )
+ IF ( [Project M GC Q1] <> BLANK (), 1, 0 )
+ IF ( [Project M GC Q2] <> BLANK (), 1, 0 )
+ IF ( [Project M GC Q3] <> BLANK (), 1, 0 )
+ IF ( [Project M GS Q1] <> BLANK (), 1, 0 )
+ IF ( [Project M RSO Q1] <> BLANK (), 1, 0 )
+ IF ( [Project M RSO Q2] <> BLANK (), 1, 0 )
RETURN
IF (
DIVIDE (
[Project M ESC Q1] + [Project M FSR Q1] + [Project M GC Q1] + [Project M GC Q2] + [Project M GC Q3] + [Project M GS Q1] + [Project M RSO Q1] + [Project M RSO Q2],
Count_
) = 0,
BLANK (),
DIVIDE (
[Project M ESC Q1] + [Project M FSR Q1] + [Project M GC Q1] + [Project M GC Q2] + [Project M GC Q3] + [Project M GS Q1] + [Project M RSO Q1] + [Project M RSO Q2],
Count_
)
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ok, I created another measure with Blank() instead of "N/A" and named it '2 Project Management'. I get another error:
I found a solution to my own problem:
@Anonymous ,
What does "Rolling average" mean? Could you show the logic using some expression?
Regards,
Jimmy Tao
I forgot to mention that the measure for 'Project Management' works exactly as intended when I add a slicer for years and quarters. So for any other graph I can slice by quarter - the measure will calculate the average of answers from that quartrer. I have six of those measures: Project Management, Personnel Management, Communication, etc. I want to show KPIs for each category. I'd like to use the KPI matrix, but I can't come up with how to get the value from last month/quarter for comparison. The matrix takes the result of the last survey if I use a date field, or month or quarter if I use those columns. However the sparkline only shows averages for particular months, not cumulative. Also I can't figure out how to compare rolling average for this month/quarter to rolling average from last month/quarter.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 64 |