<?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: [Power BI] Retourner le dernier mois (en cours) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2788465#M87487</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MTD = &lt;BR /&gt;var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())&lt;BR /&gt;var _min = eomonth(_max,-1)+1 ,&lt;BR /&gt;return&lt;BR /&gt;CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Month = &lt;BR /&gt;var _max = eomonth(if(isfiltered('Date'),MAX( 'Date'[Date]) , today()),0)&lt;BR /&gt;var _min = eomonth(_max,-1)+1 ,&lt;BR /&gt;return&lt;BR /&gt;CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2022 03:47:24 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-09-23T03:47:24Z</dc:date>
    <item>
      <title>[Power BI] Retourner le dernier mois (en cours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2786788#M87373</link>
      <description>&lt;P&gt;Bonjour,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J'ai deux objets:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- un histogramme empilé avec en axe X des mois et en axe Y des montants&lt;/P&gt;&lt;P&gt;- une Carte qui doit afficher le montant du mois en cours&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mon problème est sur ce dernier point, comme la carte affiche le montant du dernier moi en cours, lorsque je clique sur un autre mois ma carte est (vide), car pour le moment j'ai mis un filtre pour que la carte affihce uniquement le dernier mois.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Si j'enlève mon filtre la carte affiche le total des montants de tous les mois (ce que je ne souhaite pas).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comment faire pour que :&lt;/P&gt;&lt;P&gt;- lorsqu'aucun mois n'est sélectionnée la carte affiche le montant du mois en cours&amp;nbsp;&lt;/P&gt;&lt;P&gt;- lorsqu'un mois est sélectionné ma carte affiche le montant du mois sélectionnée ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Merci d'avance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 11:57:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2786788#M87373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-22T11:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: [Power BI] Retourner le dernier mois (en cours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2788465#M87487</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MTD = &lt;BR /&gt;var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())&lt;BR /&gt;var _min = eomonth(_max,-1)+1 ,&lt;BR /&gt;return&lt;BR /&gt;CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Month = &lt;BR /&gt;var _max = eomonth(if(isfiltered('Date'),MAX( 'Date'[Date]) , today()),0)&lt;BR /&gt;var _min = eomonth(_max,-1)+1 ,&lt;BR /&gt;return&lt;BR /&gt;CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 03:47:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2788465#M87487</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-23T03:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: [Power BI] Retourner le dernier mois (en cours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2788867#M87500</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sample data:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
IF (
    SELECTEDVALUE ( 'Table'[Date] ) = BLANK (),
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table' ), MONTH ( [Date] ) = MONTH ( TODAY () ) )
    ),
    SUM ( 'Table'[Value] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 07:25:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2788867#M87500</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-09-23T07:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: [Power BI] Retourner le dernier mois (en cours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2789110#M87506</link>
      <description>&lt;P&gt;Hello !&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's more like if nothing is selected, my card should display "30" the sum of the last month, and not "70" as the picture&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and if I select another month, it should display the sum of the month filteredn as the picture below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 08:36:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2789110#M87506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-23T08:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: [Power BI] Retourner le dernier mois (en cours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2789189#M87515</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Hello !&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's more like if nothing is selected, my card should display "30" the sum of the last month, and not "70" as the picture&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and if I select another month, it should display the sum of the month filteredn as the picture below&lt;/P&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Sep 2022 08:53:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2789189#M87515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-23T08:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: [Power BI] Retourner le dernier mois (en cours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2789382#M87525</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
IF (
    SELECTEDVALUE ( 'Table'[Date] ) = BLANK (),
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table' ), MONTH ( [Date] ) = MONTH(TODAY())-1
    )),
    SUM ( 'Table'[Value] )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 09:37:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2789382#M87525</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-09-23T09:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: [Power BI] Retourner le dernier mois (en cours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2789694#M87542</link>
      <description>&lt;P&gt;perfect thank you so much !!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 11:24:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Retourner-le-dernier-mois-en-cours/m-p/2789694#M87542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-23T11:24:51Z</dc:date>
    </item>
  </channel>
</rss>

