Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have a dataset that includes members' ages. The age column has outlier values such as 0 and 145. Before creating the data model and visuals, I want to detect outliers in Power Query and use quantile based flooring and capping method to treat and replace them. I appreciate your help in advance.
Solved! Go to Solution.
Check if this post can help you achieve what you need.
https://www.linkedin.com/pulse/power-bi-briefing-mpower-query-outlier-detection-time-chatterjee/
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MarjanZamani,
Thank you for reaching out to the Microsoft fabric community forum. Also thanks to @MFelix , for his insights on this thread. I reproduced the scenario, and it worked on my end. I used M code and successfully implemented it. Used line chart.
Open a blank query; it should appear like this. Then, copy and paste the M code into the advanced editor:
M Code:
let
Source = Table.FromRows({
{1, 25},
{2, 32},
{3, 0},
{4, 28},
{5, 35},
{6, 40},
{7, 145},
{8, 22},
{9, 90},
{10, 18},
{11, 55},
{12, 60},
{13, 75},
{14, 20},
{15, 33}
}, {"MemberID", "Age"}),
AddFinal = Table.AddColumn(Source, "Final_Age", each
if [Age] < 20 then 20
else if [Age] > 75 then 75
else [Age])
in
AddFinal
outcome:
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @MarjanZamani,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @MarjanZamani,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @MarjanZamani,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further.
Thank you.
Hi @MarjanZamani,
Thank you for reaching out to the Microsoft fabric community forum. Also thanks to @MFelix , for his insights on this thread. I reproduced the scenario, and it worked on my end. I used M code and successfully implemented it. Used line chart.
Open a blank query; it should appear like this. Then, copy and paste the M code into the advanced editor:
M Code:
let
Source = Table.FromRows({
{1, 25},
{2, 32},
{3, 0},
{4, 28},
{5, 35},
{6, 40},
{7, 145},
{8, 22},
{9, 90},
{10, 18},
{11, 55},
{12, 60},
{13, 75},
{14, 20},
{15, 33}
}, {"MemberID", "Age"}),
AddFinal = Table.AddColumn(Source, "Final_Age", each
if [Age] < 20 then 20
else if [Age] > 75 then 75
else [Age])
in
AddFinal
outcome:
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @MarjanZamani,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @MarjanZamani,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @MarjanZamani,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further.
Thank you.
Check if this post can help you achieve what you need.
https://www.linkedin.com/pulse/power-bi-briefing-mpower-query-outlier-detection-time-chatterjee/
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsIf you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 45 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |