<?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: Fix DAX for Calculate cross tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4874249#M185789</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281549" data-lia-user-login="lovishsood1" class="lia-mention lia-mention-user"&gt;lovishsood1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;usually functions like CONCATENATEX,ALL,SUMMARIZECOLUMNS,ALL,ALLEXCEPT,ALLSELECTED cause issues.my suggestion is to investigate them separately.try commenting one measures at a time to isolate the measure causing the real issue.&lt;/P&gt;&lt;P&gt;Please Give kudos or mark it as solution once confirmed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Nov 2025 11:15:50 GMT</pubDate>
    <dc:creator>Praful_Potphode</dc:creator>
    <dc:date>2025-11-13T11:15:50Z</dc:date>
    <item>
      <title>Fix DAX for Calculate cross tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4874011#M185785</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my DAX Query, for which I have trouble finding the solution.&lt;/P&gt;&lt;P&gt;Sometimes it gives an error on the Leaves table or sometimes random errors anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;EVALUATE CALCULATETABLE( SUMMARIZECOLUMNS( Employees[EmployeeCode], Employees[FullName], DateTable[FormatDate], DateTable[Day Name], "In Time", MIN(PunchInRecords[In_Time]), /*Measure*/ "Out Time", MAX(PunchInRecords[Out_Time]), /*Measure*/ "Punch-In Hours", SUM(PunchInRecords[PunchInHours]), /*Measure*/ "Break Hours", SUM(PunchInRecords[BreakHours]), /*Measure*/ "Work Hours", SUM(PunchInRecords[WorkHours]), /*Measure*/ "Leave Count", SUM(Leaves[LeaveCount]), /*Text Column*/ "Leave Type", CONCATENATEX(VALUES(Leaves[LeaveType]), Leaves[LeaveType], ";"), /*Text Column*/ "Leave Status", CONCATENATEX(VALUES(Leaves[RequestStatus]), Leaves[RequestStatus], ";"), /*Text Column*/ "WFH", SUM(WFH[WFH Count]), /*Text Column*/ "WFH Status", CONCATENATEX(VALUES(WFH[WFH Status]), WFH[WFH Status], ";"), /*Text Column*/ "OT", SUM(Overtime[OT_Count]), "Grant Type", CONCATENATEX(VALUES(Overtime[OT Redeem Type]), Overtime[OT Redeem Type], ";"), /*Text Column*/ "OT Status", CONCATENATEX(VALUES(Overtime[RequestStatus]), Overtime[RequestStatus], ";"), /*Text Column*/ "Color_Condition", MAX(PunchInRecords[newColor_Condition]) /*Measure*/ ), {filter_block} ) ORDER BY {order_column} {sort_dir}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody help me here?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 07:46:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4874011#M185785</guid>
      <dc:creator>lovishsood1</dc:creator>
      <dc:date>2025-11-13T07:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fix DAX for Calculate cross tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4874199#M185787</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It is adds a bit of difficulty that there is no example data, no example errors and the dax is not formatted well. However, based on your description my first recommendation is that you check that the refecend tables have valid relationships to Employees and DateTable. Another suggestion is to SUMMARIZE + ADDCOLUMNS. Here is an example generated with copilot:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;EVALUATE
VAR BaseTable =
    SUMMARIZE(
        Employees,
        Employees[EmployeeCode],
        Employees[FullName],
        DateTable[FormatDate],
        DateTable[Day Name]
    )
RETURN
ADDCOLUMNS(
    BaseTable,
    "In Time", CALCULATE(MIN(PunchInRecords[In_Time])),
    "Out Time", CALCULATE(MAX(PunchInRecords[Out_Time])),
    "Punch-In Hours", CALCULATE(SUM(PunchInRecords[PunchInHours])),
    "Break Hours", CALCULATE(SUM(PunchInRecords[BreakHours])),
    "Work Hours", CALCULATE(SUM(PunchInRecords[WorkHours])),
    "Leave Count", CALCULATE(SUM(Leaves[LeaveCount])),
    "Leave Type", CALCULATE(CONCATENATEX(VALUES(Leaves[LeaveType]), Leaves[LeaveType], ";")),
    "Leave Status", CALCULATE(CONCATENATEX(VALUES(Leaves[RequestStatus]), Leaves[RequestStatus], ";")),
    "WFH", CALCULATE(SUM(WFH[WFH Count])),
    "WFH Status", CALCULATE(CONCATENATEX(VALUES(WFH[WFH Status]), WFH[WFH Status], ";")),
    "OT", CALCULATE(SUM(Overtime[OT_Count])),
    "Grant Type", CALCULATE(CONCATENATEX(VALUES(Overtime[OT Redeem Type]), Overtime[OT Redeem Type], ";")),
    "OT Status", CALCULATE(CONCATENATEX(VALUES(Overtime[RequestStatus]), Overtime[RequestStatus], ";")),
    "Color_Condition", CALCULATE(MAX(PunchInRecords[newColor_Condition]))
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need further help, please add example errors and mock data.&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 10:36:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4874199#M185787</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2025-11-13T10:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fix DAX for Calculate cross tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4874249#M185789</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281549" data-lia-user-login="lovishsood1" class="lia-mention lia-mention-user"&gt;lovishsood1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;usually functions like CONCATENATEX,ALL,SUMMARIZECOLUMNS,ALL,ALLEXCEPT,ALLSELECTED cause issues.my suggestion is to investigate them separately.try commenting one measures at a time to isolate the measure causing the real issue.&lt;/P&gt;&lt;P&gt;Please Give kudos or mark it as solution once confirmed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 11:15:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4874249#M185789</guid>
      <dc:creator>Praful_Potphode</dc:creator>
      <dc:date>2025-11-13T11:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fix DAX for Calculate cross tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4875446#M185819</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281549" data-lia-user-login="lovishsood1" class="lia-mention lia-mention-user"&gt;lovishsood1&lt;/a&gt; ,&lt;BR /&gt;Thanks for the update. I’ve reviewed the logic and here is the version of the new table DAX. This version uses a CROSSJOIN between Employees and DateTable, and then adds the daily values from each activity table. It now returns the expected results for each employee and date.&lt;/P&gt;
&lt;P&gt;Base_Output =&lt;BR /&gt;VAR BaseTable =&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;CROSSJOIN( Employees, DateTable ),&lt;BR /&gt;Employees[EmployeeCode],&lt;BR /&gt;Employees[FullName],&lt;BR /&gt;DateTable[FormatDate],&lt;BR /&gt;DateTable[Day Name]&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;ADDCOLUMNS(&lt;BR /&gt;BaseTable,&lt;BR /&gt;"In Time", CALCULATE( MIN( PunchInRecords[In_Time] ) ),&lt;BR /&gt;"Out Time", CALCULATE( MAX( PunchOutRecords[Out_Time] ) ),&lt;BR /&gt;"Punch Hours",&lt;BR /&gt;COALESCE(&lt;BR /&gt;CALCULATE( SUM( TimeRecords[TotalHours] ) ),&lt;BR /&gt;DIVIDE(&lt;BR /&gt;DATEDIFF(&lt;BR /&gt;CALCULATE( MIN( PunchInRecords[In_Time] ) ),&lt;BR /&gt;CALCULATE( MAX( PunchOutRecords[Out_Time] ) ),&lt;BR /&gt;MINUTE&lt;BR /&gt;),&lt;BR /&gt;60&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;"Break Hours", CALCULATE( SUM( BreakRecords[BreakHours] ) ),&lt;BR /&gt;"Leave Count",&lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;'Leaves',&lt;BR /&gt;'Leaves'[EmployeeCode] = SELECTEDVALUE( Employees[EmployeeCode] )&lt;BR /&gt;&amp;amp;&amp;amp; 'Leaves'[FormatDate] = SELECTEDVALUE( DateTable[FormatDate] )&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;"Total Hours", CALCULATE( SUM( TimeRecords[TotalHours] ) )&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;ARTICLE class="" dir="auto" tabindex="-1" data-turn-id="request-WEB:a485fd33-aaac-4065-a105-ab27a92e0c95-104" data-testid="conversation-turn-64" data-scroll-anchor="false" data-turn="assistant"&gt;
&lt;DIV class=""&gt;
&lt;DIV class="" tabindex="-1"&gt;
&lt;DIV class=""&gt;
&lt;DIV class="" dir="auto" data-message-author-role="assistant" data-message-id="2acca0fc-7141-43d7-bdd4-c5426c48431e" data-message-model-slug="gpt-5-1"&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;P data-start="1082" data-end="1304" data-is-last-node="" data-is-only-node=""&gt;Let me know if you want any help further.&lt;/P&gt;
&lt;DIV class=""&gt;Thank you.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/ARTICLE&gt;</description>
      <pubDate>Fri, 14 Nov 2025 09:55:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4875446#M185819</guid>
      <dc:creator>v-sshirivolu</dc:creator>
      <dc:date>2025-11-14T09:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fix DAX for Calculate cross tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4875547#M185821</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has been resolved. It was just some data type issues and syntax errors on Table/Column Names.&lt;BR /&gt;&lt;BR /&gt;This DAX is working fine.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 11:30:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-DAX-for-Calculate-cross-tables/m-p/4875547#M185821</guid>
      <dc:creator>lovishsood1</dc:creator>
      <dc:date>2025-11-14T11:30:51Z</dc:date>
    </item>
  </channel>
</rss>

