Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
J3
Frequent Visitor

Medida acumulada suma medidas

hola, necesito crear una medida que me permita sumar el acumulado de la medida ejemplo en febrero me sume (2,23 +-3,02).. etc. Y si lo muestro en una tarjeta me muestre la suma total. porque lo que aparece actualmente en total no es la suma real deberia ser 12,9

J3_0-1708975450204.png

 

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @J3 

If you want to achieve accumulation in a year, you can consider creating a date table, and then associate the date table with the data table, and use DATESYTD() functions, you can refer to the following example

Sample data

vxinruzhumsft_0-1708998420644.png

Date table

vxinruzhumsft_1-1708998450466.png

The relationship 

vxinruzhumsft_2-1708998467410.png

Sample measure

Test = MAX('Table'[Value])

Now we're going to implement the accumulation of test measure.

Create a new measure.

Measure = CALCULATE(SUMX('Table',[Test]),DATESYTD('Date'[Date]))

Output

vxinruzhumsft_3-1708998595218.png

vxinruzhumsft_4-1708998617594.png

 

And you can refer to the following link about the function.

DATESYTD function (DAX) - DAX | Microsoft Learn

 

Best Regards!

Yolo Zhu

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

3 REPLIES 3
v-xinruzhu-msft
Community Support
Community Support

Hi @J3 

If you want to achieve accumulation in a year, you can consider creating a date table, and then associate the date table with the data table, and use DATESYTD() functions, you can refer to the following example

Sample data

vxinruzhumsft_0-1708998420644.png

Date table

vxinruzhumsft_1-1708998450466.png

The relationship 

vxinruzhumsft_2-1708998467410.png

Sample measure

Test = MAX('Table'[Value])

Now we're going to implement the accumulation of test measure.

Create a new measure.

Measure = CALCULATE(SUMX('Table',[Test]),DATESYTD('Date'[Date]))

Output

vxinruzhumsft_3-1708998595218.png

vxinruzhumsft_4-1708998617594.png

 

And you can refer to the following link about the function.

DATESYTD function (DAX) - DAX | Microsoft Learn

 

Best Regards!

Yolo Zhu

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

 

 

 

 

Muchas gracias, funciona perfecto.

 

Pero me surgió otra duda, si yo quiero hacer acumulado con datos del año 2024 tambien es decir quiero sumar de enero 2023 a enero 2024 o más, como lo deberia hacer? porque al hacerlo actualmente me devuelve 0%

lbendlin
Super User
Super User

You cannot measure a measure.  Either materialize it first, or implement your entire business logic in a new measure.  

 

"Think like the Grand Total"  - Making the Total value work will likely also cover the individual items.

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors