Forum Discussion
How to add range filter and take average across columns
guitardude333
You need to first UnPivot all the Availablity columns in Tables to convert from columns to rows in Power Query.
Now it will allow you to create a measure to average the required numbers.
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
Thanks for your reply.
While trying to unpivot columns I get the error
"Column 'Person' in Table 'PersonTime' contains a duplicate value 'A' and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.
This is probably because the column 'Person' is a primary key. I deleted the relationships of this table with other tables and was able to unpivot. How can I again make these relationships?
Also, I am not sure how to create a dynamic measure. How can I specify start and end date for this measure and take the average of the values in between (for each person)?
Could you please tell me the steps? Sorry for my ignorance, I am new to Power BI.
Thank you
- V-lianl-msft5 years ago
Community Support
Hi guitardude333 ,
Change the aggregation mode of value field to "average".
For more details,please refer to:
How to add range filter and take average across columns
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.