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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dobregon
Impactful Individual
Impactful Individual

summarize a measure that it is calculated with formulas

Hi,

 

It need some help if exist something that i can do in DAX.

I have a table with daily values. Then i have created a measures that calculate day by day (it is not possible in a column of the table, should be a measure). So, for the daily values are ok in the matrix visual

but the problem is when I create other matrix visuals only at year, monthl level, because the measure is calculating the values according to de aggregation at yearly,monthly level. What i need is when i aggreate at monthly or yearly level, give me the sum of the values of the calculations at daily level, not claculate again.

is it something possible in DAX?



Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

Yes this is possible. You would do this using the SUMX function.

 

Something like:

SUMX( VALUES( 'Date'[Date] ),  <your expression here> )

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @dobregon,

According to your deduction, It sounds like a common multiple aggregation requirement on measure expression.
For this scenario, you need to add a variable with summarize function to do the first aggregate, then use the iterator function on the parameter table to apply the second one.

For N level aggregates also can be worked with the same logic, you can use variables and nested summarize functions with the previous result to apply next level aggregate and finally use an iterator function to summary table records to one to apply the last level aggregations.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
d_gosbell
Super User
Super User

Yes this is possible. You would do this using the SUMX function.

 

Something like:

SUMX( VALUES( 'Date'[Date] ),  <your expression here> )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.