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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
vaibhavd
Frequent Visitor

In metrics visual, how to make subtotal as dynamic average based on drill down date ?

When the column header is selected as Month, provide average by month and user drill up to have quarter, the provide average by quarter.

 

Currently with following measure, I could see average by month but when I drill-up, average value should be the average of values displayed in columns.

 

My Maesure: 

Index =
VAR FactorTableByCustomer = SUMMARIZE(CUSTOMERS, CUSTOMERS[CUSTOMER_CD], "FactorCustomer", [Index ReportedIssue])
VAR FactorTableByMonth = SUMMARIZE(Dates, Dates[MonthInCalendar], "FactorMonth", [Index ReportedIssue])
VAR FactorTableByDay = SUMMARIZE(Dates, Dates[DayInCalendar], "FactorDay", [Index ReportedIssue])

RETURN
     IF(HASONEFILTER(Dates[DayInCalendar]),
           AVERAGEX(FactorTableByCustomer, [FactorCustomer]),
               IF(HASONEFILTER(Dates[MonthInCalendar]),
                  AVERAGEX(FactorTableByCustomer, [FactorCustomer]),
                       IF(HASONEFILTER(CUSTOMERS[CustomerBranch]),
                          AVERAGEX(FactorTableByMonth, [FactorMonth])
                      )
                 )
        )

 

CustomerBranchJul-19Aug-19Sep-19Oct-19Nov-19Dev-19Jan-20Average
A252500199020.14
B53731342010031.14
C2073220703010045
Average16.72626.71124.72396.7 

 

CustomerBranchQ3-19Q4-19Q1-20AverageExpected Avg
A10.76.39020.1435.7
B2712.310031.1446.4
C31.7401004557.23
Average23.119.596.7  

 

Please suggest - how can I achive this.

 

Thanks,

Vaibhav

1 REPLY 1
Anonymous
Not applicable

Hello,

 

Will need more information on this to try helping out – what are examples of values you'd get from [Index ReportedIssue], [FactmorMonth] and [FactorCustomer]?

Also, it might be helpful to check out these articles about using SUMMARIZE() functions, could be possible that you're losing context because of how you have them currently structured.

https://www.sqlbi.com/articles/best-practices-using-summarize-and-addcolumns/

https://powerpivotpro.com/2017/12/summarize-addcolumns-arent-scary-can-see/

 

 Also also, instead of using HASONEFILTER(), maybe try using ISFILTERED() to see if that yields different results?

https://docs.microsoft.com/en-us/dax/isfiltered-function-dax

Shots in the dark but hopefully these will be helpful.

Thanks,
HI_IM_THIBBY

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.