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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
kaileena
Frequent Visitor

how to filter in query

Hello,

 

 

I paste here a sample of my data (Measurement table with all columns):

kaileena_0-1661352329263.png

Here is my slicer which contains a subset of Entity (Entity Reference Table column Entity PK).

(Measurement Table references Entity Table of course)

kaileena_2-1661352638954.png

The problem is that: i am forced to have a subset of entities in the slicer which actually represent the parent entities (Payer, pib...). They are parent entities for all the other entities which are also present in the Measurement table (i.e. Payer entity is parent for archery, karate, surfing ). In other words: in my Measurement Table in the column called Entity I have all the entities (parent plus children) whereas in the slicer I have to filter only on the parent entities. 

 

The relation parent-child can be seen by looking at the Cadence column from the Measurement Table.

 

Now I have to calculate the Story point measure for the child entities (since i do not already have an aggregate at parent entity level). I have so far:

 

kaileena_3-1661353255882.png

But it does not work....

 

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @kaileena ,

 

Based on your description, I have modified yor measure, please try:

Value for Story Points Delivered = 
SWITCH(
    SELECTEDVALUE('Entity Reference'[Entity (PK)]),
    "Payer",
    CALCULATE(
        SUM(Measurement[Value]),
        FILTER(ALL(Measurement),
        'Measurement'[Type] in {"Story Points Delivered"}&&
        CONTAINSSTRING('Measurement'[Cadence],"PAYER") = TRUE()
    )),0)

Final output:

vjianbolimsft_0-1661753720930.png

vjianbolimsft_1-1661753738969.png

If the result is not what you want, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @kaileena ,

 

Based on your description, I have modified yor measure, please try:

Value for Story Points Delivered = 
SWITCH(
    SELECTEDVALUE('Entity Reference'[Entity (PK)]),
    "Payer",
    CALCULATE(
        SUM(Measurement[Value]),
        FILTER(ALL(Measurement),
        'Measurement'[Type] in {"Story Points Delivered"}&&
        CONTAINSSTRING('Measurement'[Cadence],"PAYER") = TRUE()
    )),0)

Final output:

vjianbolimsft_0-1661753720930.png

vjianbolimsft_1-1661753738969.png

If the result is not what you want, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.