cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Help writing DAX measure

I have a table with the format below . I need to be able to create a measure that calculates the sum of the values based on the corresponding date (month to date ONLY). For instance, today's value would be 14 and tomorrow's would be 214.

 

Thank you for the help

 

Date                Value

1-31                 200

2-1                   2

2-2                   1

2-3                   2

2-4                   1

2-5                   2

2-6                   1

2-7                   2

2-8                   3

2-9                   200

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Help writing DAX measure

@thampton,

 

You may try DAX function TOTALMTD, create a measure and use DAX formula below:

Result =
TOTALMTD ( SUM ( Table[Value] ), Table[Date] )

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Highlighted
Anonymous
Not applicable

Re: Help writing DAX measure

hello @thampton,

need a lot more explaination. maybe some pictures. not really sure what your asking

 

best regards, 

Collin

Highlighted
Helper III
Helper III

Re: Help writing DAX measure

@Anonymous

 

Today is 2-8 :  When i write the measure i want it to calculate the sum of the values next to the dates from 2-1 to 2-8 as shown above, but tomorrow, it should sum the values from 2-1 to 2-9, etc.

Highlighted
Anonymous
Not applicable

Re: Help writing DAX measure

ok, i see now, and do  you want it to work with real time? or simply add the days before the date selected?? 

Highlighted
Helper III
Helper III

Re: Help writing DAX measure

@Anonymous Yes, updating real time would be perfect. I dont plan on using slicer to control date. 

Highlighted
Anonymous
Not applicable

Re: Help writing DAX measure

I am not that strong with date formating and code, sorry on that respect , 

but I would suggest looking through this website here that has all the dax commands that can be used in power BI, spesificaly heres a link to the date and time section

 

https://docs.microsoft.com/en-us/dax/date-and-time-functions-dax

 

sorry I could not be of more help.

 

best regards,

Collin

Highlighted
Community Support
Community Support

Re: Help writing DAX measure

@thampton,

 

You may try DAX function TOTALMTD, create a measure and use DAX formula below:

Result =
TOTALMTD ( SUM ( Table[Value] ), Table[Date] )

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Resolver III
Resolver III

Re: Help writing DAX measure

Hi Tampton,

 

First you need to have a date column with DD/MM/YYYY, and use DATESMTD function to get desired results.

 

Regards,

Pavan Vanguri.

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors