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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
nesrinehal20
Frequent Visitor

Problem Filter

I have a "fac_assabil_ork" table and a rooting table. I want to filter a KPI calculated from the rooting by family and item, but the problem is that the rooting table doesn't contain the family and item.
I linked the sales(fac_assabil_ork) and rooting tables by the representative dimension, and the sales table linked by the item dimension, but I couldn't filter the KPI by family.
kpi : 

Nb Clients Non Plannifé =
CALCULATE (
    DISTINCTCOUNT ( ASS_ROOTING_TEST[PARTNER_CODE] ),
    ASS_ROOTING_TEST[IN_PLANNING] = "NON",
    TREATAS ( VALUES ( FAC_ASSABIL_ORK[ROLE_CODE] ), ASS_ROOTING_TEST[REP] )
)

nesrinehal20_0-1757926599171.png

 

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hi @nesrinehal20 

Could you please follow below steps: 


1. Dummy Tables created to solve problem. You can replace table names with your tables.
Table name : ASS_ROOTING_TEST
image.png

 

 

 

 

 

 

 

 

Table name : DimArticle
image.png

 

 

 

 

 

Table name : FAC_ASSABIL_ORK
image.png

 

 

 

 

 

 

 

 

 

2. Modelling :

image.png

3. Create Measure

Nb Clients Non Planifie = 
CALCULATE (
    DISTINCTCOUNT ( ASS_ROOTING_TEST[PARTNER_CODE] ),
    ASS_ROOTING_TEST[IN_PLANNING] = "NON",
    TREATAS ( VALUES ( FAC_ASSABIL_ORK[ROLE_CODE] ), ASS_ROOTING_TEST[REP] ),
    TREATAS ( VALUES ( FAC_ASSABIL_ORK[ITEM_CODE] ), DimArticle[ITEM_CODE] )
)

 

Outcome : 
image.png

 




Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

1 REPLY 1
rohit1991
Super User
Super User

Hi @nesrinehal20 

Could you please follow below steps: 


1. Dummy Tables created to solve problem. You can replace table names with your tables.
Table name : ASS_ROOTING_TEST
image.png

 

 

 

 

 

 

 

 

Table name : DimArticle
image.png

 

 

 

 

 

Table name : FAC_ASSABIL_ORK
image.png

 

 

 

 

 

 

 

 

 

2. Modelling :

image.png

3. Create Measure

Nb Clients Non Planifie = 
CALCULATE (
    DISTINCTCOUNT ( ASS_ROOTING_TEST[PARTNER_CODE] ),
    ASS_ROOTING_TEST[IN_PLANNING] = "NON",
    TREATAS ( VALUES ( FAC_ASSABIL_ORK[ROLE_CODE] ), ASS_ROOTING_TEST[REP] ),
    TREATAS ( VALUES ( FAC_ASSABIL_ORK[ITEM_CODE] ), DimArticle[ITEM_CODE] )
)

 

Outcome : 
image.png

 




Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.