<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic how to filter in query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-filter-in-query/m-p/2723728#M83169</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I paste here a sample of my data (Measurement table with all columns):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is my slicer which contains a subset of Entity (Entity Reference Table column Entity PK).&lt;/P&gt;&lt;P&gt;(Measurement Table references Entity Table of course)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The relation parent-child can be seen by looking at the Cadence column from the Measurement Table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But it does not work....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2022 15:04:00 GMT</pubDate>
    <dc:creator>kaileena</dc:creator>
    <dc:date>2022-08-24T15:04:00Z</dc:date>
    <item>
      <title>how to filter in query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-filter-in-query/m-p/2723728#M83169</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I paste here a sample of my data (Measurement table with all columns):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is my slicer which contains a subset of Entity (Entity Reference Table column Entity PK).&lt;/P&gt;&lt;P&gt;(Measurement Table references Entity Table of course)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The relation parent-child can be seen by looking at the Cadence column from the Measurement Table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But it does not work....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 15:04:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-filter-in-query/m-p/2723728#M83169</guid>
      <dc:creator>kaileena</dc:creator>
      <dc:date>2022-08-24T15:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter in query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-filter-in-query/m-p/2731567#M83664</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="411694" data-lia-user-login="kaileena" class="lia-mention lia-mention-user"&gt;kaileena&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, I have modified yor measure, please try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;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"}&amp;amp;&amp;amp;
        CONTAINSSTRING('Measurement'[Cadence],"PAYER") = TRUE()
    )),0)&lt;/LI-CODE&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If the result is not what you want,&amp;nbsp;please provide me with more details about your table and your problem or share me with your pbix file after&amp;nbsp;&lt;STRONG&gt;removing sensitive data.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7Cv-jianboli%40microsoft.com%7Ca7ce12be0f454896a61208da8034281b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637963258750159993%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=orVyE0%2FImc2MEFUqXtCveK0uf33594f67ZDxb8ybuNI%3D&amp;amp;reserved=0" target="_blank"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C01%7Cv-jianboli%40microsoft.com%7Ca7ce12be0f454896a61208da8034281b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637963258750159993%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=XocTq9o6TjxbxJqTak20E3kKp7q5HxKTNZef7xESMV0%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jianbo Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 06:17:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-filter-in-query/m-p/2731567#M83664</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-08-29T06:17:12Z</dc:date>
    </item>
  </channel>
</rss>

