<?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 Compliance against the Targets in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4307914#M171086</link>
    <description>&lt;P&gt;I have a daily targets of supplying seven skill types of workers to ten sites . the targets for each skill type is different for different sites. I supply the workers sometimes less or more than the daily target. I keep a daywise record of each person, mentioning their name, designation and the site. the records shows only those who are present on a particular date. there is no record of absents. i want to visualise the compliance ( site wise as well as designation wise) on daily, weekly, monthly, quarterly and Fiscal yearly (Apr-Mar) basis. I tried but did not get the correct measure for the target. Please help.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Nov 2024 16:55:38 GMT</pubDate>
    <dc:creator>HSK25</dc:creator>
    <dc:date>2024-11-29T16:55:38Z</dc:date>
    <item>
      <title>Compliance against the Targets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4307914#M171086</link>
      <description>&lt;P&gt;I have a daily targets of supplying seven skill types of workers to ten sites . the targets for each skill type is different for different sites. I supply the workers sometimes less or more than the daily target. I keep a daywise record of each person, mentioning their name, designation and the site. the records shows only those who are present on a particular date. there is no record of absents. i want to visualise the compliance ( site wise as well as designation wise) on daily, weekly, monthly, quarterly and Fiscal yearly (Apr-Mar) basis. I tried but did not get the correct measure for the target. Please help.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2024 16:55:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4307914#M171086</guid>
      <dc:creator>HSK25</dc:creator>
      <dc:date>2024-11-29T16:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Compliance against the Targets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4308158#M171100</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="852466" data-lia-user-login="HSK25" class="lia-mention lia-mention-user"&gt;HSK25&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To visualize compliance effectively, you need to calculate it as the ratio of the number of workers supplied to the target for each skill type and site. Start by preparing your data model. Create a fact table containing daily records of workers who were present, with columns like Date, Name, Designation, and Site. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then, prepare a target table that includes Site, Designation, Target, and, if targets vary over time, a Date column. If targets are static, the Date column can be omitted. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Finally, set up a calendar table to enable slicing by fiscal year, quarters, and other time periods. This table can be generated using a DAX formula such as:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calendar = 
ADDCOLUMNS(
    CALENDAR(MIN(FactTable[Date]), MAX(FactTable[Date])),
    "Year", YEAR([Date]),
    "Month", FORMAT([Date], "MMM"),
    "Fiscal Year", IF(MONTH([Date]) &amp;gt;= 4, YEAR([Date]), YEAR([Date]) - 1)
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Establish relationships by linking the fact table to the calendar table on the Date column and linking the fact and target tables using Site and Designation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Next, calculate measures to analyze compliance. Start with Total Supplied, which counts the workers supplied using the formula:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Supplied = COUNTROWS('Fact Table')
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;For Total Target, aggregate the targets dynamically based on the time period using:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Target = SUM('Target Table'[Target])
&lt;/LI-CODE&gt;
&lt;P&gt;The compliance percentage can then be calculated as:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Compliance % = DIVIDE([Total Supplied], [Total Target], 0)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;To track cumulative performance, use functions like DATESYTD, DATESMTD, or DATESQTD. For example, monthly cumulative compliance can be calculated with:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cumulative Supplied = 
CALCULATE([Total Supplied], DATESMTD('Calendar'[Date]))
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Cumulative Target = 
CALCULATE([Total Target], DATESMTD('Calendar'[Date]))
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Cumulative Compliance % = DIVIDE([Cumulative Supplied], [Cumulative Target], 0)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;To visualize the results, you can use line or column charts to show daily compliance, with Date on the X-axis and Compliance % on the Y-axis. Add slicers for Site and Designation to allow focused analysis. For weekly, monthly, quarterly, or fiscal year compliance, create aggregated measures using the time intelligence functions above and display them in visualizations like line charts or matrix tables. A heatmap or matrix can also effectively display compliance levels by site and designation over time, with conditional formatting to highlight compliance levels.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It’s important to handle missing data carefully, as absent workers are not recorded. Ensure that targets are linked to the full date range from the calendar table to avoid gaps in calculations. Additionally, slicers for site, designation, and time periods (daily, weekly, monthly, etc.) will enhance dynamic analysis. If the target measure does not calculate correctly, check the relationships between tables and verify that the aggregations are using the correct context, possibly with functions like SUMX or CALCULATE. If you have sample data or details of your current model, I can assist further in refining these formulas.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2024 04:19:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4308158#M171100</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2024-11-30T04:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Compliance against the Targets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4308173#M171101</link>
      <description>&lt;P&gt;Thanks for the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;The Target measure is resulting only the daily targets. and, there is an issue in the reltionship between the FACT and TARGET table (cardnality Many - Many).&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2024 04:58:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4308173#M171101</guid>
      <dc:creator>HSK25</dc:creator>
      <dc:date>2024-11-30T04:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Compliance against the Targets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4314891#M171333</link>
      <description>&lt;P&gt;Please share sample data and desired output so that we can understand the exact scenario and try to solve.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 08:07:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-against-the-Targets/m-p/4314891#M171333</guid>
      <dc:creator>Rupak_bi</dc:creator>
      <dc:date>2024-12-05T08:07:06Z</dc:date>
    </item>
  </channel>
</rss>

