<?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 Daily used and month total consumed in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3073275#M106758</link>
    <description>&lt;P&gt;could anyone help use DAX to calculate the daily consumed and month consumed quickly after combined sheets named Mmeter and Vmeter together and then calculate them?&amp;nbsp; &amp;nbsp;in sheet sample is only for Mmeter clumsily.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;only based on the first 4 columns marked&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is a very simple issue for all of you.&amp;nbsp; thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/x/s!AqYSh-5UaI9Wg2Rwxsi0R23A90tw?e=bcoL3k" target="_blank"&gt;FGGGasStatistic.xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2023 23:53:24 GMT</pubDate>
    <dc:creator>ssysanny</dc:creator>
    <dc:date>2023-02-09T23:53:24Z</dc:date>
    <item>
      <title>Daily used and month total consumed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3073275#M106758</link>
      <description>&lt;P&gt;could anyone help use DAX to calculate the daily consumed and month consumed quickly after combined sheets named Mmeter and Vmeter together and then calculate them?&amp;nbsp; &amp;nbsp;in sheet sample is only for Mmeter clumsily.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;only based on the first 4 columns marked&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is a very simple issue for all of you.&amp;nbsp; thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/x/s!AqYSh-5UaI9Wg2Rwxsi0R23A90tw?e=bcoL3k" target="_blank"&gt;FGGGasStatistic.xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 23:53:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3073275#M106758</guid>
      <dc:creator>ssysanny</dc:creator>
      <dc:date>2023-02-09T23:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Daily used and month total consumed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3073480#M106769</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="422717" data-lia-user-login="ssysanny" class="lia-mention lia-mention-user"&gt;ssysanny&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you want to get the "&lt;SPAN&gt;Daily used and month total consumed&lt;/SPAN&gt;".&lt;/P&gt;
&lt;P&gt;Thanks for your sample data .And for your need in Excel, you need to calculate with the row judgement.&lt;/P&gt;
&lt;P&gt;So we need to add an Index column in Power BI Editor both in two tables.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;And i add four calculated columns in two tables.There may be some biases in understanding your data, and I think you can download my pbix file to view it and fine-tune your logic.&lt;/P&gt;
&lt;P&gt;The end result i get is this, and sorry for i can not unsersatnd the "Summary" worksheet table in your Excel. I think when we has this calculated columns , you can resolve it in Power BI Desktop!&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you still need help with this problem, you can try to describe your requirements calculation process in more detail and give the results you want in the end as a table to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 02:58:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3073480#M106769</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-02-10T02:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Daily used and month total consumed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3073701#M106785</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="433015" data-lia-user-login="v-yueyunzh-msft" class="lia-mention lia-mention-user"&gt;v-yueyunzh-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;many thanks for your work.&amp;nbsp; however my request is as attached and need to calculate it by DAX and also other assistant columns (Dailyused,AccUsed,DailyUsedCalc) are not neccesary.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;further need one date table and then these sheets are fact table to build it. thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AqYSh-5UaI9Wg2UUH5XDeUMjAPPw?e=HBoC8Y" target="_blank" rel="noopener"&gt;20230210Daily used and month total consumed.pbix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 06:28:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3073701#M106785</guid>
      <dc:creator>ssysanny</dc:creator>
      <dc:date>2023-02-10T06:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Daily used and month total consumed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3076938#M107015</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="422717" data-lia-user-login="ssysanny" class="lia-mention lia-mention-user"&gt;ssysanny&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description,&amp;nbsp; i may got missing in your need.And thanks for the test .pbix you provide with me.&lt;/P&gt;
&lt;P&gt;Do you mean you want to make the "Vmeter" and the "Mmeter" show both in one matrix visual?&lt;BR /&gt;If this , you can refer to these steps.&lt;/P&gt;
&lt;P&gt;(1)We can create a dimension table like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(2)We need to update the table relationship between your tables:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(3)Then we can create two measures:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = var _cur_row = MAX('Row Header'[RowNames])
return
IF(_cur_row="Vmeter" ,SUM(Vmeter[AccUsed]),SUM('Mmeter'[DailyUsedCalc]))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = SUMX(VALUES('Row Header'[RowNames]) , [Measure])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(4)Then we can put the [Measure 2] on the visual and we can meet your need:&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this method does not meet your needs, you can provide us with &amp;nbsp;&lt;STRONG&gt;desired output sample&lt;/STRONG&gt; data in the form of &lt;STRONG&gt;tables&lt;/STRONG&gt;, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 03:59:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3076938#M107015</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-02-13T03:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Daily used and month total consumed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3080926#M107378</link>
      <description>&lt;P&gt;thanks you very much.&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="433015" data-lia-user-login="v-yueyunzh-msft" class="lia-mention lia-mention-user"&gt;v-yueyunzh-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;actually in these 2 sheets the original columns are as follow.&amp;nbsp; so my question is how to :&lt;/P&gt;&lt;P&gt;1, need create date table to build relationship&amp;nbsp;&lt;/P&gt;&lt;P&gt;2, how to create measures to get the dailyused number(in table named dailyused/dailyusedcalc) and also the accused number(in table named accused)&lt;/P&gt;&lt;P&gt;3, and then to use these measures to create that sample tabel.&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;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 07:33:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3080926#M107378</guid>
      <dc:creator>ssysanny</dc:creator>
      <dc:date>2023-02-15T07:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Daily used and month total consumed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3082468#M107505</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="422717" data-lia-user-login="ssysanny" class="lia-mention lia-mention-user"&gt;ssysanny&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean you want to get the value in measure not in the calculated column in the 'Vmeter' and the 'Mmeter'?&lt;/P&gt;
&lt;P&gt;And by onther my end result is right or not ?Dose the Matrix is the end result you are looking for(just update the measure to contains the calculated columns)?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 01:36:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3082468#M107505</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-02-16T01:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Daily used and month total consumed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3082888#M107538</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="433015" data-lia-user-login="v-yueyunzh-msft" class="lia-mention lia-mention-user"&gt;v-yueyunzh-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your time and work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, other assistant columns are not needed and directly calculate by the original columns.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this one is right and expected for monthly number and also need to get the accumulative number. thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 08:10:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3082888#M107538</guid>
      <dc:creator>ssysanny</dc:creator>
      <dc:date>2023-02-16T08:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Daily used and month total consumed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3084237#M107676</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="422717" data-lia-user-login="ssysanny" class="lia-mention lia-mention-user"&gt;ssysanny&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean you want to convert the calcualted columns to the measure?But in your screenshot , i can not understand how to calcuate the value of the 'Vmeter'.&lt;/P&gt;
&lt;P&gt;You can try to refer to this dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = var _cur_row = MAX('Row Header'[RowNames])var _t= ADDCOLUMNS( ALLSELECTED('Vmeter') , "Dailyused2" , var _next_row = FILTER(ALLSELECTED('Vmeter'),'Vmeter'[Index]=EARLIER(Vmeter[Index])+1) return IF([Index]=1, 0 , [CloseBalance]-MAXX(_next_row,[CloseBalance])))var _t1 = ADDCOLUMNS(_t ,"AccUsed2" , var _value=14054 var _t= FILTER(_t,'Vmeter'[Index]&amp;lt;EARLIER('Vmeter'[Index])) return _value+ SUMX(_t,[Dailyused2]))var _t2 = ADDCOLUMNS( ALLSELECTED('Mmeter') , "Dailyused2" ,var _index=[Index] var _next_row = FILTER(ALLSELECTED('Mmeter'),'Mmeter'[Index] = _index+1) return [CloseBalance]-MAXX(_next_row,[CloseBalance])+MAXX(_next_row,[ReCharges]) )var _t3 =ADDCOLUMNS(_t2,"DailyUsedCalc2", var _last_index = MAXX(_t2,[Index]) return IF([Index]=_last_index , 0 ,[Dailyused2]))returnIF(_cur_row="Vmeter" ,SUMX( FILTER(_t1,MONTH( [DateRead]) =MONTH(MAX('tblDate'[Date])) &amp;amp;&amp;amp; year( [DateRead]) =year(MAX('tblDate'[Date]))) , [AccUsed2]),SUMX( FILTER(_t3,MONTH( [DateRead]) =MONTH(MAX('tblDate'[Date])) &amp;amp;&amp;amp; year( [DateRead]) =year(MAX('tblDate'[Date]))) , [DailyUsedCalc2]) )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = var _t =ADDCOLUMNS( CROSSJOIN( CROSSJOIN(ALLSELECTED('Row Header'[RowNames]),ALLSELECTED('tblDate'[MonthNumber])) , VALUES('tblDate'[Year])) , "v" , [Measure])var _date = VALUES('tblDate'[MonthNumber])var _row =VALUES('Row Header'[RowNames])var _year =VALUES(tblDate[Year])returnSUMX( FILTER(_t , [MonthNumber] in _date &amp;amp;&amp;amp; [RowNames] in _row &amp;amp;&amp;amp; [Year] in _year) , [v])&lt;/LI-CODE&gt;
&lt;P&gt;For this , you can delete the calcualted columns in the raw table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this method does not meet your needs, you can provide us with &amp;nbsp;&lt;STRONG&gt;desired output sample&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data in the form of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;tables&lt;/STRONG&gt;, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 01:55:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Daily-used-and-month-total-consumed/m-p/3084237#M107676</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-02-17T01:55:05Z</dc:date>
    </item>
  </channel>
</rss>

