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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Rinku21
Helper III
Helper III

column value comparison in Power BI

Hi,

 

I have created a Histogram and Normal distribution curve in Power BI. I want to show the Mean value in the graph.

I have created a below formula:

μ = IF('DISTRIBUCION NORMAL'[X]=ROUND([Mean_Age],0),[f(x)],0)
so that, if the value of the Mean_Age matches to the value of the 'DISTRIBUCION NORMAL'[X], then gererate the bar.
 
'DISTRIBUCION NORMAL'[X] -->  It contains series of values from 10 to 60.
Mean_Age --> Mean calculated for the Age.
 
Currently, I am able to get the bar and it is showing as below:
Mean_bar.PNG

 

So when the Mean_age value  matches with  ''DISTRIBUCION NORMAL'[X]', it shows the f(x) value in the 'μ' column else return '0' as below:

Data.PNG

 

but when I select any value from the filter, the mean value gets changed but in the 'μ' column, its not changing.

Please see the below example,

here, I selected, Emp Id 1 and 2, the mean value is: 14 but in the bar it's still showing as 29. It is not considering the filter selection and comparision is not happening.

Issue.PNG

 

still showing value for 29 in the data as well.

Data1.PNG

 

Does anyone have idea about this? Am I missing anything?

Thanks in advance.

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Rinku21 are you adding μ as column, it should be measure:

 

μ = IF(MAX('DISTRIBUCION NORMAL'[X])=ROUND([Mean_Age],0),[f(x)],0)

 

Ask anything Power BI. Book appointment for a free consultancy at https://www.perytus.com

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@Rinku21 are you adding μ as column, it should be measure:

 

μ = IF(MAX('DISTRIBUCION NORMAL'[X])=ROUND([Mean_Age],0),[f(x)],0)

 

Ask anything Power BI. Book appointment for a free consultancy at https://www.perytus.com

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k ,

 

Is there any way we can show 'Mean_Age' on the Data label? Currently, it is not showing the Mean value  (14) on the label.

 

pro.PNG

@Rinku21 it should if you have data labelled turned on.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k ,

If I turn on the label, it shows f(x)  value as 'μ_measure' returning that value.

 

pro1.PNG

Hi @parry2k,

 

It is working perfectly. Thank you so much 🙂

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.