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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Dynamic filtering/column issue

**edited to clarify terminology**

 

Hi,

 

New to Power Bi and DAX and struggling with the following issue.

 

I have a very large dataset with properties similar to the below example data. I am trying to identify if my data for the year 2020 is unusual (because of covid). My analysis is being done at Faculty level.

 

A simplification of what I would like to do is filter my list of subjects from 2020 based on if they are an outlier inside a Faculty based on 2019 data. To make the example simple here I will just call an outlier >Quartile 3 (Q3) or <Quartile 1 (Q1) of the 2019 data. 

 

Calculating Q1 and Q3 for each faculty is easily done with a measure. However I do not want to hard code those values anywhere for a number of reasons.

 

So what I need in the below table is a calculated column "outlier" that identifies for a subject in 2020 in a particular Faculty if the average mark is >Q3 or <Q1 for the same faculty for 2019 data. But this value needs to be dynamic, so for example if I realise subject C should be in Faculty 1 instead of 2, a recalculation is done to redetermine the outlier status of this subject, etc.

 

Logically what I need but because of my lack of DAX knowledge cannot construct is:

 

=IF(OR([Average Mark] > (Dynamic Value of Q3 for Subject's Faculty and Year  = 2019), [Average Mark] < (Dynamic Value Q1 for Subject's Faculty and Year  = 2019), "Outlier", "Not Outlier")

 

Any help, hints, directions to similar postings appreciated.

 

SubjectFacultyYearAverage Mark
A1202050
B1202060
C2202060
D2202055
E3202065
F3202075
A1201985
B1201955
C2201965
D2201960
E3201935
F3201945

 

1 ACCEPTED SOLUTION
5 REPLIES 5
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Can you share sample data aong with dates.

 

Regards,

Harsh Nathani

 

 

 

 

Anonymous
Not applicable

Sorry, I should have been clearer. Q1 and Q3 are quartile 1 and quartile 3, not quarter 1 and quarter 3. This is an attempt to identify "outliers" in exam results data, the only time variable is year.

 

So Q3 = percentile.inc([Average Mark], 0.75) for example.

 

I will re-edit original post for clarity.

Anonymous
Not applicable

Definitely, thanks very much

amitchandak
Super User
Super User

@Anonymous , I do not see any qtr in data.

Typically when I do not have the date, Try to add a date and try to use date table and time intelligence. Else I move time-related data to a new table. Create a rank and do it.

 

 

Using Rank

https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123

 

uning Time Intelligence 2
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839

 

Creating date when Date is not there

Within first few mins -https://www.youtube.com/watch?v=yPQ9UV37LOU&t=28s

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.