<?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 Need help on DAX calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4057172#M161019</link>
    <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking for your support on creating a calcuated column to show the products information by apply sertain filters through dax.&lt;/P&gt;&lt;P&gt;When it comes to my requirment, i have a table like below with sample data&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;i am joining the above table with my date table by date to date. As per user requirement if user selected a date range, based on that we need to show the count of products along with the respective product values should show like below,&lt;/P&gt;&lt;P&gt;If user selected date range as 01-01-2023 to 31-12-2023, then i need to show the details for unsold products for the month on Nov'2023.&lt;/P&gt;&lt;P&gt;When means unsold count of products: &lt;STRONG&gt;3&lt;/STRONG&gt; and products info should be &lt;STRONG&gt;Bike &amp;amp; Bus&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;product count in a card visual and products info should be on table visual&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should be dynamic based on the user selection of date. So pls do the needful on getting this done and share the sample .pbix if you achive this . Thank you so much for your much appreciated support!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lavan&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2024 18:43:11 GMT</pubDate>
    <dc:creator>lavankumar1989a</dc:creator>
    <dc:date>2024-07-23T18:43:11Z</dc:date>
    <item>
      <title>Need help on DAX calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4057172#M161019</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking for your support on creating a calcuated column to show the products information by apply sertain filters through dax.&lt;/P&gt;&lt;P&gt;When it comes to my requirment, i have a table like below with sample data&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;i am joining the above table with my date table by date to date. As per user requirement if user selected a date range, based on that we need to show the count of products along with the respective product values should show like below,&lt;/P&gt;&lt;P&gt;If user selected date range as 01-01-2023 to 31-12-2023, then i need to show the details for unsold products for the month on Nov'2023.&lt;/P&gt;&lt;P&gt;When means unsold count of products: &lt;STRONG&gt;3&lt;/STRONG&gt; and products info should be &lt;STRONG&gt;Bike &amp;amp; Bus&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;product count in a card visual and products info should be on table visual&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should be dynamic based on the user selection of date. So pls do the needful on getting this done and share the sample .pbix if you achive this . Thank you so much for your much appreciated support!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lavan&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 18:43:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4057172#M161019</guid>
      <dc:creator>lavankumar1989a</dc:creator>
      <dc:date>2024-07-23T18:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on DAX calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4057655#M161040</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="185263" data-lia-user-login="lavankumar1989a" class="lia-mention lia-mention-user"&gt;lavankumar1989a&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please check if this accomodate your need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as far as i know, there are two ways to show your goal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. you can use measure&lt;/P&gt;&lt;P&gt;- create a new measure&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Unsold =&lt;/SPAN&gt; &lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Status]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Unsold"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN&gt;- plot your data in table and/or card visual&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. you can use visual filter&lt;/P&gt;&lt;P&gt;- plot you data in table then tick "Unsold" using visual filter for showing only Unsold&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I find your result is weird, you said theresult should be Bike and Bus, but there is one Auto with Unsold status on 25-12-2023.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 Jul 2024 02:35:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4057655#M161040</guid>
      <dc:creator>Irwan</dc:creator>
      <dc:date>2024-07-24T02:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on DAX calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4057805#M161054</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="185263" data-lia-user-login="lavankumar1989a" class="lia-mention lia-mention-user"&gt;lavankumar1989a&lt;/a&gt;&amp;nbsp;，Thanks for the reply from &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490030" data-lia-user-login="Irwan" class="lia-mention lia-mention-user"&gt;Irwan&lt;/a&gt;&amp;nbsp;, please allow me to provide another insight:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a date table for your necessary if you do not have it:&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="markup"&gt;DateTable = CALENDAR(DATE (2023, 1, 1), DATE (2023, 12, 31))&lt;/LI-CODE&gt;
&lt;UL&gt;
&lt;LI&gt;Ensure there's a relationship between your product table and the date table based on the date fields.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Since you need this to be dynamic based on user selection, we will use two measures instead of calculated columns：&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="markup"&gt;UnSoldCount = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Date] IN ALLSELECTED(DateTable[Date]) &amp;amp;&amp;amp; 'Table'[Status]="unsold"))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;UnsoldProduct =

CONCATENATEX(

    FILTER(

        'Table',

        'Table'[Date] IN ALLSELECTED(DateTable[Date]) &amp;amp;&amp;amp; 'Table'[Status] = "unsold"

    ),

    'Table'[Product], 

    ", "

)&lt;/LI-CODE&gt;
&lt;P&gt;As irwan mentioned, the "Auto" product will also be included in your resut,if I misundertand your issue, please feel free to reply:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Joyce&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 04:40:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4057805#M161054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-24T04:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on DAX calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4058035#M161061</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490030" data-lia-user-login="Irwan" class="lia-mention lia-mention-user"&gt;Irwan&lt;/a&gt;&amp;nbsp; for you kind reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me brief my requirement that what i am looking,&lt;/P&gt;&lt;P&gt;I have a 2 tables 1.fact table &amp;amp; 2. date dimension table and relationship established between fact &amp;amp; date dimension tables using date key or date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a slicer as date range starting from 01-01-2021 to 30-06-2024, when user select the data range as like below,&lt;/P&gt;&lt;P&gt;01-01-2023 to 31-12-2023, first we find the month for max date range which means it's dec'2023 month of max(31-12-2023). based on this we need to show product info as max month-1 means Nov'2023 unslod information need to show in table visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if user select time range as 20-06-2023&amp;nbsp; to 30-11-2023, max month would be Nov'2023 and need to show previous month data from max date selected. which means Oct'2023 unsold if any. this should be dynamic in nature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope it's clear, please do let me know if any clarifications needed. Thank you so much for your efforts and help!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 06:29:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4058035#M161061</guid>
      <dc:creator>lavankumar1989a</dc:creator>
      <dc:date>2024-07-24T06:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on DAX calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4066482#M161428</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="185263" data-lia-user-login="lavankumar1989a" class="lia-mention lia-mention-user"&gt;lavankumar1989a&lt;/a&gt;, thank you for your additional inforamtion!&lt;BR /&gt;Please check the udpdated answer:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;UnSoldCount = 
VAR SelectedStartDate = MIN('DateTable'[Date])
VAR SelectedEndDate = MAX('DateTable'[Date])
VAR AdjustedEndDate = EOMONTH(SelectedEndDate, -1)
RETURN
CALCULATE(
   COUNTROWS('Table'),
   FILTER(
       'Table',
       'Table'[Date] &amp;gt;= SelectedStartDate &amp;amp;&amp;amp;
       'Table'[Date] &amp;lt;= AdjustedEndDate &amp;amp;&amp;amp;
       'Table'[Status] = "unsold"
   ))
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;UnSoldProduct = 
VAR SelectedStartDate = MIN('DateTable'[Date])
VAR SelectedEndDate = MAX('DateTable'[Date])
VAR AdjustedEndDate = EOMONTH(SelectedEndDate, -1)
RETURN
CONCATENATEX(
    FILTER(
        'Table',
        'Table'[Date] &amp;gt;= SelectedStartDate &amp;amp;&amp;amp;
        'Table'[Date] &amp;lt;= AdjustedEndDate &amp;amp;&amp;amp;
        'Table'[Status] = "unsold"
    ),
    'Table'[Product],
    ", "
)&lt;/LI-CODE&gt;
&lt;P&gt;Result for your reference:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Joyce&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 07:50:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4066482#M161428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-29T07:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on DAX calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4066917#M161445</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;and much appriceated dor your support. DAX that you shared is working as expected.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 11:53:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-DAX-calculation/m-p/4066917#M161445</guid>
      <dc:creator>lavankumar1989a</dc:creator>
      <dc:date>2024-07-29T11:53:53Z</dc:date>
    </item>
  </channel>
</rss>

