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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ariana_night
Frequent Visitor

Subtotals in Matrix needed in DAX

Hello,

 

I am trying to get the same subtotals that are in my matrix into some Dax measures so I can then compare periods and create variance measures. I need to have month to date, previous month, year to date, and previous year. 

Example: Month to date is currently showing subtotal of 82.28% for Frozen Units Filled %. I need to get this same result from a Dax calculation.

Same for last month: previous month subtotal is 83.49%. I would then create a measure to get the variance (I know this part already). 

- [ReqAvailableDate] is connected to field [Week Date] in a separate Calendar table. 

- [Frozen Units Filled %] is a measure I created. 

 

ariana_night_0-1692645326068.png ariana_night_1-1692645830891.png

 

I appreciate your help. Please let me know if you need additional information. 

 

 

 

3 REPLIES 3
ariana_night
Frequent Visitor

I hope this is the information you need...

 

Below table is a sample with aggregates for Frozen Units Filled each day in the previous month.

 

(Frozen Units Filled% is a dax measure = (DIVIDE(CALCULATE(SUM('FrozenFillRate'[Confirmed Sales Quantity])), CALCULATE(SUM('FrozenFillRate'[Order Quantity])))

 

I need to create a measure that will give me the total of the Frozen Units Filled % in the previous month, which would be 83.55% (as generated when the data is placed in a matrix). 

 

Year - MonthReqAvailableDateFrozen Units Filled %
2023-77/1/202377.17%
2023-77/2/202385.03%
2023-77/3/202386.17%
2023-77/4/202385.53%
2023-77/5/202381.55%
2023-77/6/202381.36%
2023-77/7/202384.12%
2023-77/8/202379.61%
2023-77/9/202373.15%
2023-77/10/202383.80%
2023-77/11/202387.74%
2023-77/12/202384.04%
2023-77/13/202385.61%
2023-77/14/202384.52%
2023-77/15/202379.94%
2023-77/16/202379.28%
2023-77/17/202382.48%
2023-77/18/202385.45%
2023-77/19/202384.60%
2023-77/20/202385.22%
2023-77/21/202384.53%
2023-77/22/202381.72%
2023-77/23/202382.87%
2023-77/24/202382.00%
2023-77/25/202378.14%
2023-77/26/202387.45%
2023-77/27/202387.61%
2023-77/28/202381.31%
2023-77/29/202380.55%
2023-77/30/202386.06%
2023-77/31/202382.67%

 

@Greg_Deckler forgot to tag you

Greg_Deckler
Community Champion
Community Champion

@ariana_night Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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