cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper III

## Creating a column that shows above or below average

I have a column with daily records of rainfall. I want to create a new column that calculates if a certain day is above/below the average rainfall over the course of the year.

It should go something like IF(Rainfall, > Average(Rainfall), "Above Average", < Average(Rainfall), "Below Average")

Clearly this measure is wrong, just wanted to give an idea of what I'm trying to accomplish, thanks!

1 ACCEPTED SOLUTION
Community Support

Hi @water-guy-5 ,

You can follow the blow steps to get it:

1. Create a measure to get the average of rainfall

``Average of rainfall = CALCULATE ( AVERAGE ( 'Table'[Rainfall] ), ALLSELECTED ( 'Table' ) )``

2. Create a calculated column to get the value which shows above or below average

``````Column =
IF (
'Table'[Rainfall] > [Average of rainfall],
"Above Average",
IF (
'Table'[Rainfall] < [Average of rainfall],
"Below Average",
"Equal Average"
)
)``````

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support

Hi @water-guy-5 ,

You can follow the blow steps to get it:

1. Create a measure to get the average of rainfall

``Average of rainfall = CALCULATE ( AVERAGE ( 'Table'[Rainfall] ), ALLSELECTED ( 'Table' ) )``

2. Create a calculated column to get the value which shows above or below average

``````Column =
IF (
'Table'[Rainfall] > [Average of rainfall],
"Above Average",
IF (
'Table'[Rainfall] < [Average of rainfall],
"Below Average",
"Equal Average"
)
)``````

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Resolver III

The below logic should work:

Indicator = IF('Table'[Rainfall]>AVERAGE('Table'[Rainfall]),"Above Average",
IF('Table'[Rainfall]<AVERAGE('Table'[Rainfall]),"Below Average",
"Average"))

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors