Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
i820017
Resolver II
Resolver II

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'.

 

i820017_0-1652473513530.png

 

Would an Switch statement work in this case?

1 ACCEPTED SOLUTION
SergioSilvaPT
Resolver V
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 day
SergioSilvaPT_1-1652476275848.png

 

Or month

SergioSilvaPT_0-1652476244783.png

 

Regards,

Sérgio Silva 

 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Regards,
Sérgio Silva

If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

How has Standard been calculated?  Share the download link of the PBI file.  Show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
SergioSilvaPT
Resolver V
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 day
SergioSilvaPT_1-1652476275848.png

 

Or month

SergioSilvaPT_0-1652476244783.png

 

Regards,

Sérgio Silva 

 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Regards,
Sérgio Silva

If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

This worked...thanks!!

Glad i could help!

Regards,
Sérgio Silva

If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/
i820017
Resolver II
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.

 

i820017_0-1652475207181.png

 

SergioSilvaPT
Resolver V
Resolver V

Hi @i820017 ,

 

What is standard calculating? Do you have an PBIX example?

Regards,
Sérgio Silva

If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.