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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.