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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
sanju24566
Regular Visitor

DAX

 

Site Code appearing multiple timesSite Code appearing multiple times

 

Hello

I Need to find here the following No. of sites codes >= 1.5 average value
So Above are the Site Codes in 2nd Column for different Toxin Names at different year . So One Site code is appearing multiple times. And there is Values in last column. I want to create a measure which groups or remove duplicate of Site Codes and alonside give me the Average of the Values column where the average of Values is >= 1.5  for each Site Code

So when I use in a visual I could get No. of sites codes >= 1.5 average value. When used with a Year in Axis.

8 REPLIES 8
NikhilChenna
Skilled Sharer
Skilled Sharer

Hi @sanju24566 , I think this is the solution.

 

1. Create a summarized table in Power BI, go to the modelling tab and click on the new table option as shown in the below screenshot.

NikhilChenna_0-1669294988411.png

 

Summarize_table =
SUMMARIZE(
    'table1',
    'table1'[Site Code],
    "AvgValue",AVERAGE('table1'[value])
)
 
2. After this you can create calculated column to for your condition of value 1.5 average value.
calculated column = IF('table1'[AvgValue]>=1.5,1,0)
 
So now you filter 1 you will be able to see the site codes where the avg. if the value is greater and equal to 1.5.
 
Regards,
Nikhil Chenna
 
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

thanks but isnt this possible with measure

Hi @sanju24566 ,

 

Try using Summarize with measure and let me know. Creating a summarized table is suitable in this situation.

 

Regards,

Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

 

 

Hello Nikhil 

Thanks for the solution. But the results are not what I expected

sanju24566_0-1669307255254.png

I wanted to know the No. of Site Counts >=1.5 yearwise. It is showing me the Total Count of Site Code

sanju24566_1-1669307661223.png

This is what I want to achieve. Can I use a related function anywhere?

Hi @sanju24566 ,

 

I think we already got the solution. you just have to visual level fiter to this visual.

 

After this you can create calculated column to for your condition of value 1.5 average value.
calculated column = IF('table1'[AvgValue]>=1.5,1,0)
 
Add this calculated column as visual level filter. You should get the desired output.
 
Regards,
Nikhil Chenna
 
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

sanju24566_0-1669355046092.png

i have already used it in the visual above with Year in the axis. But the Count is coming 19 which is Total Count of Site Code

Hi @sanju24566 ,

 

Can you provide me this below excel file with few entires. I will try again and let you know in few mintues.sanju24566_1-1669307661223.png 

 

Regards,

Nikhil Chenna

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors