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
Anonymous
Not applicable

Issue with filtering

Hi all, I have some question in decile filtering.
In my matrix table I have "# of customers" column which total is divided deciles(01, 02,..., 10). And each deciles equals each others

Capture.PNG

DecileSet
IF( Query1[YearDecile] <= Query1[OnePart],"Decile01",
if(Query1[YearDecile]>Query1[OnePart] && Query1[YearDecile]<=(2*Query1[OnePart]),"Decile02",
if(Query1[YearDecile]>2*Query1[OnePart] && Query1[YearDecile]<=(3*Query1[OnePart]),"Decile03",
if(Query1[YearDecile]>3*Query1[OnePart] && Query1[YearDecile]<=(4*Query1[OnePart]),"Decile04",
if(Query1[YearDecile]>4*Query1[OnePart] && Query1[YearDecile]<=(5*Query1[OnePart]),"Decile05",
if(Query1[YearDecile]>5*Query1[OnePart] && Query1[YearDecile]<=(6*Query1[OnePart]),"Decile06",
if(Query1[YearDecile]>6*Query1[OnePart] && Query1[YearDecile]<=(7*Query1[OnePart]),"Decile07",
if(Query1[YearDecile]>7*Query1[OnePart] && Query1[YearDecile]<=(8*Query1[OnePart]),"Decile08",
if(Query1[YearDecile]>8*Query1[OnePart] && Query1[YearDecile]<=(9*Query1[OnePart]),"Decile09",
if(Query1[YearDecile]>9*Query1[OnePart] && Query1[YearDecile]<=(10*Query1[OnePart]),"Decile10",""
)
)))))))))
 
OnePart = Query1[YearDecileMax]/10
 
YearDecileMax =
CALCULATE (
MAX ( Query1[YearDecile] ),
FILTER ( Query1, Query1[Fiscal Year] = EARLIER ( Query1[Fiscal Year] ) )
)
 
Memb = CALCULATE(SUM(Query1[isMember])) / CALCULATE(SUM(Query1[isMember]), ALLEXCEPT(Query1, Query1[DecileSet]))
 
 
 
When I filtering by year everything is working good (total change value and deciles(01,02,..,10) change too).
Capture.PNG
 
But when I filter by month or by customer the deciles(01,02,...,10) does not equal each others.
 
Capture.PNG
 
 
Please help me figure this critical problem. When I am filtering by all filters (year, month or costumer) I want to see equals values on each deciles 🙂
1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

I'd like to suggest you share your pbix file with some sample data for test, it will help us to clarify your scenario.

 

In addition, I found your formula are based on year value. When you filter on month, it will filter table records return multiple years who matched with current selection.

 

If that is a case, your formula will get wrong result.(calculation is based on single year, you are try to use it on multiple years)

 

Regards,

Xiaoxin Sheng

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.