Forum Discussion
Column to Measure
The following table is data that I entered in manually.
Is there any way that I can convert the column entitled 'Standard' into a Measure? Normally, I use MAX to do this, but the problem is that when I use MAX in this case, then my Power BI report uses 125 for each month for 'Standard'.
Would an Switch statement work in this case?
Assuming that you have an calendar table in your model, you can create this measure:
Standard=AVERAGEX('Calendar',CALCULATE([Days Worked] * SELECTEDVALUE(Tbl[Daily Avg Standard])))Where 'Calendar' should be the name of your calendar table, and Tbl the name of the table where the column Daily Avg Standard is.It should work has intended:By dayOr month
Regards,
Sérgio Silva
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
6 Replies
- SergioSilvaPT
Resolver V
- i820017
Resolver II
'Daily Avg Standard' (or Standard) needs to be multiplied by the 'Days Worked'. However, I cannot do this because 'Days Worked' is a measure and 'Daily Avg Standard' is a column.
- SergioSilvaPT
Resolver V
Assuming that you have an calendar table in your model, you can create this measure:
Standard=AVERAGEX('Calendar',CALCULATE([Days Worked] * SELECTEDVALUE(Tbl[Daily Avg Standard])))Where 'Calendar' should be the name of your calendar table, and Tbl the name of the table where the column Daily Avg Standard is.It should work has intended:By dayOr month
Regards,
Sérgio Silva
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.- i820017
Resolver II
This worked...thanks!!
- SergioSilvaPT
Resolver V
Glad i could help!
- Ashish_Mathur
Super User
Hi,
How has Standard been calculated? Share the download link of the PBI file. Show the expected result.