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
pschn1993
Frequent Visitor

Subtotals are the same value as totals

I am using the below formula and the subtotals are the same as the total for YTD Actl & YTD Bdgt. How can I adjust my formula to display the correct subtotals?

 

YTD Bdgt = var selectvalue = SELECTEDVALUE('Calendar'[monthnum])
var t =
CALCULATE(
SUM(financials_bdgt[Budget accounting amount]),
FILTER(
ALLEXCEPT(financials_bdgt,'Calendar'[fy],Mills[Location],Dpt[deptabrv],Accounts[Dim Ledger Accounts.Main account]),
financials_bdgt[Period - Fiscal.Fiscal Month] <= selectvalue
)
)
return
IF(
MINX(financials_bdgt,financials_bdgt[Period - Fiscal.Fiscal Month]) = selectvalue,
t,
BLANK()
)
 
pschn1993_0-1647963849381.png

 

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @pschn1993 

It seems something wrong with the red part below,

vxiaotang_0-1648192516630.png

try to change it to

ALLEXCEPT (
                financials_bdgt,
                financials_bdgt[fy],
                financials_bdgt[Location],
                financials_bdgt[deptabrv],
                financials_bdgt[Dim Ledger Accounts.Main account]
            ),

or

filter(ALL(financials_bdgt),
financials_bdgt[fy]=min('Calendar'[fy]) &&
financials_bdgt[Location]=min(Mills[Location]) &&
financials_bdgt[deptabrv]=min( Dpt[deptabrv]) &&
financials_bdgt[[Dim Ledger Accounts.Main account]]=
min( Accounts[Dim Ledger Accounts.Main account]) &&
financials_bdgt[Period - Fiscal.Fiscal Month] <= selectvalue)

 However, without data we are just guessing. If the above doesn't help, could you share a sample file? Thanks

 

Best Regards,

Community Support Team _Tang

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

Tutu_in_YYC
Resident Rockstar
Resident Rockstar

Hi, my guess is the total is correct for QA but not for the Admins. Is there a pbix I can have a look at?

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.

Top Solution Authors
Top Kudoed Authors