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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Total not showing in table views for average measure

Hello, 

 

I'm at my wits end with this issue. I'm struggling to make it so the total of the table is printed. I believe the issue is with the context of the total but I'm not sure how to solve it.

I have the following table:

Freforio_1-1662036623596.png

 

Here is the breakdown of the columns:


Date
comes from a Calendar


Meas_FTDS
is a measure calculated this way:

CALCULATE(
SUMX(Fact_Earnings,Fact_Earnings[ftds]),
filter(Fact_Earnings,Fact_Earnings[Incomplete extract]=0))
Just a sumx of the ftds column and filtered so it does not return any incomplete extract.
 
FC_FTD 13M MA
 
VAR
    FTD1mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -1, MONTH ) )
VAR
    FTD2mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -2, MONTH ) )
VAR
    FTD3mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -3, MONTH ) )
VAR
    FTD4mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -4, MONTH ) )
VAR
    FTD5mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -5, MONTH ) )
VAR
    FTD6mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -6, MONTH ) )
VAR
    FTD7mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -7, MONTH ) )
VAR
    FTD8mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -8, MONTH ) )
VAR
    FTD9mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -9, MONTH ) )
VAR
    FTD10mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -10, MONTH ) )
VAR
    FTD11mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -11, MONTH ) )
VAR
    FTD12mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -12, MONTH ) )
VAR
    FTD13mAgo = CALCULATE([Meas_FTDS],dateadd(_Calendar[Date], -13, MONTH ) )
VAR
    MA = CALCULATE(DIVIDE( FTD1mAgo + FTD2mAgo + FTD3mAgo + FTD4mAgo + FTD5mAgo + FTD6mAgo + FTD7mAgo + FTD8mAgo + FTD9mAgo + FTD10mAgo + FTD11mAgo + FTD12mAgo+ FTD13mAgo, 13,0))
VAR
    OnlyFC = IF(ISBLANK([Meas_FTDS]),
    CALCULATE(MA, SAMEPERIODLASTYEAR(_Calendar[Date])),
    BLANK())
RETURN
    OnlyFC
When I Return the variable MA I get the total amount but I want to filter so this column only returns values at the total or on days I don't have a figure in column Meas_FTDS That way I can get both in a single measure later.
 
I would greatly appreciate any help.
 

 

1 ACCEPTED SOLUTION

@Anonymous 

You can use a new measure 

FC_FTD 13M MA 2 =
SUMX ( VALUES ( _Calendar[Date] ), [FC_FTD 13M MA] )

View solution in original post

5 REPLIES 5
tamerj1
Super User
Super User

@Anonymous 

Do you want to return the average of the visible values or the sum of the visible values?

Anonymous
Not applicable

Hello, the sum of visible values.

@Anonymous 

You can use a new measure 

FC_FTD 13M MA 2 =
SUMX ( VALUES ( _Calendar[Date] ), [FC_FTD 13M MA] )

Anonymous
Not applicable

Thanks a lot! I guess the new measure gets a different context than any carried over from the variables? 

@Anonymous 
Exactly

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.