<?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 Re: Suitable DAX for model having two fact tables and multiple dim tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3787200#M147929</link>
    <description>&lt;P&gt;@&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/607128" target="_self"&gt;&lt;SPAN class=""&gt;a-bekkaoui&lt;/SPAN&gt;&lt;/A&gt;&lt;BR /&gt;Hi. Thanks for your inputs. I tried facing error. I think i could not implement your suggestion. If you can help me in the PBI file ,that will be great.&lt;BR /&gt;I had also uploaded the revised PBIX file with my current visual (generated out of measure from calculated column -but not scalable).&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1bVmbOCBNamuj7mX8ya-wCuFI7Aa6VHMJ/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1bVmbOCBNamuj7mX8ya-wCuFI7Aa6VHMJ/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Please suggest by suitable DAX measure using relationship directly on the data set with out any calculated columns.&lt;BR /&gt;Being a newbie could not grasp much of your inputs and sorry for the same.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Mar 2024 04:46:32 GMT</pubDate>
    <dc:creator>InsHunter</dc:creator>
    <dc:date>2024-03-23T04:46:32Z</dc:date>
    <item>
      <title>Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3769242#M147209</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Requesting help on suitable DAX for creating matrix visual as below using two fact tables.&lt;BR /&gt;FactTable1 having ReasonCode ingested at various time windows for several&amp;nbsp; devices&lt;BR /&gt;FactTable2 having Value ingested at various time stamps for several meters&lt;/P&gt;&lt;P&gt;DimTable2 has the description for Reasons&lt;BR /&gt;There is a bridge table DimTable1 mapping deviceID and meterID and has the description of machine name as well.&lt;BR /&gt;Also there are two Dim tables one for Date (DimTable3) and another for time (DimTable4).&lt;/P&gt;&lt;P&gt;Data model proposed as below.(PBIX file also enclosed)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required basic matrix visual giving aggregated total of values (FactTable2) output sliced based on date window and machine name as below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I had used calculated columns and got the output but since data size is huge it takes processing time and gets hanged.&lt;BR /&gt;I need a suitable DAX which will aggregate based on relation ship only for my requirement.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 09:22:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3769242#M147209</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-17T09:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3769246#M147210</link>
      <description>&lt;P&gt;Apologies for adding incorrect google drive link.&lt;BR /&gt;Please find the correct link as below:&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1ucuL0FoV5KIGT0vFSvybg4ORxW6-CPSs/view?usp=drive_link" target="_blank"&gt;https://drive.google.com/file/d/1ucuL0FoV5KIGT0vFSvybg4ORxW6-CPSs/view?usp=drive_link&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 09:21:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3769246#M147210</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-17T09:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3770902#M147277</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="445637" data-lia-user-login="InsHunter" class="lia-mention lia-mention-user"&gt;InsHunter&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the link you shared requires a login to personal Google account to open it, and due to privacy requirements, you need to provide a link that does not require a login to Google account to open the file.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yang&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 09:09:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3770902#M147277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-18T09:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3771138#M147306</link>
      <description>&lt;P&gt;My sincere apologies for the same:&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1bVmbOCBNamuj7mX8ya-wCuFI7Aa6VHMJ/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1bVmbOCBNamuj7mX8ya-wCuFI7Aa6VHMJ/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please confirm in order.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2024 04:47:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3771138#M147306</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-23T04:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3777623#M147652</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hi. In the past you had helped me for solutions. Can u please help with building&amp;nbsp; DAX Measures for my current model.&amp;nbsp;&lt;BR /&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 08:10:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3777623#M147652</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-20T08:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3780900#M147723</link>
      <description>&lt;P&gt;Your current model can be improved.&amp;nbsp; You can wire in the Dates and Times tables, and I would recommend you separate the Devices from the Meters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 23:44:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3780900#M147723</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-20T23:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3782256#M147754</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Many thanks for your response. Iam sorry I could not get your suggestions. I dont know how to use the time combined&amp;nbsp; with the date as a slicer for the visual filter and hence using only the date for the slicer.&amp;nbsp; Currently using only calculated column for the "event" table as below. But its taking lot of time due to size&amp;nbsp; in the original data set.The DAX for calculated column "Value_mapped&lt;SPAN&gt;" as in original data set (events table)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;is as below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Value_mapped = 

VAR Energy_table_from_meter = CALCULATETABLE (
        meter,
        CROSSFILTER ( meter[MeterID], DeviceID_MeterID_Mapping[MeterID], BOTH ))

VAR filtered_Energy_table_from_meter = FILTER (
            Energy_table_from_meter,
            meter[Date_Time] &amp;lt; events[EndDatetime]
            &amp;amp;&amp;amp; meter[Date_Time] &amp;gt;= events[StartDatetime]
        )
RETURN SUMX(filtered_Energy_table_from_meter, meter[value])&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;DIV&gt;Iam using this to summarise by a DAX&amp;nbsp; (SUMX)on the calculated column field.But value being arrived at also slightly differs from the output of the person giving summary in SQL using "between" function.&lt;/DIV&gt;Request your help for DAX directly on to matrix visual with out going for calculated column. Iam a newbie to POWER BI.&lt;BR /&gt;Your help as in the past is deeply appreciated.&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thank you.&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;I would request the DAX for the measure.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 09:39:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3782256#M147754</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-21T09:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3784251#M147829</link>
      <description>&lt;P&gt;You can only start working on the measure after you get your data model in order.&amp;nbsp; Have you made the changes I suggested?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 01:14:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3784251#M147829</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-22T01:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3785799#M147871</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;My apoogies Iam unable to get your point on the wiring my time dimtable to the time fields of my factable..Since iam using&amp;nbsp; only date slicer for visual do i need to use the time. Also the DAX I suppose will use the Date time field directly for the window capture of value.&amp;nbsp;&lt;BR /&gt;Requesting you to elaborate on the same.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 10:09:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3785799#M147871</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-22T10:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3785804#M147872</link>
      <description>&lt;P&gt;Typo-"apologies"&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 10:09:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3785804#M147872</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-22T10:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3786309#M147893</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this out and tell me if it works, couldn't get hand on your Pbix file unfortunatly but here is the idea:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you'll need to write measures that can calculate across the two fact tables and slice by both date and machine name. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;we will focus on measures that aggregate values on the fly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Use RELATED and RELATEDTABLE functions&lt;/STRONG&gt; where necessary to pull in values from related tables, particularly for getting the machine name and reason descriptions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Use time intelligence functions&lt;/STRONG&gt; if needed, to aggregate over time periods like months.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Based on the model and the visual representation you've provided, you might need a measure similar to the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Total Value by Reason =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM(FactTable2[Value]),&lt;BR /&gt;TREATAS(&lt;BR /&gt;VALUES(DimTable1[DeviceID]),&lt;BR /&gt;FactTable1[DeviceID]&lt;BR /&gt;),&lt;BR /&gt;TREATAS(&lt;BR /&gt;VALUES(DimTable3[Date]),&lt;BR /&gt;FactTable1[StartDate],&lt;BR /&gt;FactTable1[EndDate]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This measure calculates the total value from &lt;STRONG&gt;FactTable2&lt;/STRONG&gt; for the time windows specified in &lt;STRONG&gt;FactTable1&lt;/STRONG&gt;. The &lt;STRONG&gt;TREATAS&lt;/STRONG&gt; function is used to treat columns as if they were filters. This can be particularly useful when working with multiple fact tables that don't have a direct relationship but are related through dimension tables. THe core idea is around this logic.&lt;BR /&gt;&lt;BR /&gt;Note:&lt;SPAN&gt;&amp;nbsp;this DAX measure is conceptual, based on the information provided and without knowing the full details of your data model. You may need to adjust field names and logic to fit your exact scenario.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 13:52:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3786309#M147893</guid>
      <dc:creator>a-bekkaoui</dc:creator>
      <dc:date>2024-03-22T13:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3787200#M147929</link>
      <description>&lt;P&gt;@&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/607128" target="_self"&gt;&lt;SPAN class=""&gt;a-bekkaoui&lt;/SPAN&gt;&lt;/A&gt;&lt;BR /&gt;Hi. Thanks for your inputs. I tried facing error. I think i could not implement your suggestion. If you can help me in the PBI file ,that will be great.&lt;BR /&gt;I had also uploaded the revised PBIX file with my current visual (generated out of measure from calculated column -but not scalable).&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1bVmbOCBNamuj7mX8ya-wCuFI7Aa6VHMJ/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1bVmbOCBNamuj7mX8ya-wCuFI7Aa6VHMJ/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Please suggest by suitable DAX measure using relationship directly on the data set with out any calculated columns.&lt;BR /&gt;Being a newbie could not grasp much of your inputs and sorry for the same.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2024 04:46:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3787200#M147929</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-23T04:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3787764#M147975</link>
      <description>&lt;P&gt;Your DimTable1 still needs to be broken up into separate Device and Meter dimensions.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2024 21:59:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3787764#M147975</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-23T21:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable DAX for model having two fact tables and multiple dim tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3788596#M148026</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hi. Thank u for your response.&lt;BR /&gt;I can do that. But I intend to keep this DimTable1 as a mapping table between deviceID and meterID as different parameters are monitored by them but for same machine.I use the "MachineName" field in the mapping table as a slicer.&amp;nbsp;&lt;BR /&gt;I can make them separately for meterID and deviceID. You can advise the way forward how to proceed .Thank you...&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 05:02:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suitable-DAX-for-model-having-two-fact-tables-and-multiple-dim/m-p/3788596#M148026</guid>
      <dc:creator>InsHunter</dc:creator>
      <dc:date>2024-03-25T05:02:24Z</dc:date>
    </item>
  </channel>
</rss>

