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
IamTDR
Responsive Resident
Responsive Resident

Help with a Measure Total

I am looking for some advise on how I can get my sum total to foot.

I have a dimension table for the sales category, a table for my Returns %, and a total for my gross sales.

I created two simple measures, Gross_Sales=sum('sales_basis'[sales_amt]) and Returns_Ratio=sum('Returns_%_Tbl'[returns_ratio]). 

My third measure is Extrapolated_Amt(Gross_Sales*Returns_Ratio)

Everything seems to work fine except for the Extrapolated Total. Any advise? 

I will then need to create a fourth measure that will multiply against the 'Extrapolated Amt' so this total needs to be accurate.

 

Thanks in advanceCapture.PNG

1 ACCEPTED SOLUTION

add a filter

calculate(Extrapoled Amt ,filter(customer_type_tbl,not(customer_type_tbl[customer_type_desc] in {"Author"})))

Or try

sumx(,filter(values(customer_type_tbl[customer_type_desc]),not(customer_type_tbl[customer_type_desc] in {"Author"}))).[gross sales]*[5 Yr Returns Ratio])

 

Add all the values to {"Author"}

 

 

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

Ideally, we should have sum(A) * sum(B). But as data is coming from different level we need to do a product at that level and then sum it up.

Try

sumx(values(customer[customer type]),[Gross_Sales]*[Returns_Ratio])
or
sumx(summarize(customer,customer[customer type],"_GS",[Gross_Sales],"_RR"[Returns_Ratio]),[_GS]*[_RR])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you so much!  That worked!

 

I also just found out that the customer type 'individual', 'author', and 'internal' should not be in the Extrapolated Amt measure.

Any suggestions on how I can filter those three customer types out of the Extrapolated Total?

I tired placing your provided measure inside a calculated measure and filter out the customer types I didnt need, but that didnt work.Capture.PNG

IamTDR
Responsive Resident
Responsive Resident

Forgot to include the measure that I am currently using.

Extrapoled Amt = sumx(values(customer_type_tbl[customer_type_desc]).[gross sales]*[5 Yr Returns Ratio])

add a filter

calculate(Extrapoled Amt ,filter(customer_type_tbl,not(customer_type_tbl[customer_type_desc] in {"Author"})))

Or try

sumx(,filter(values(customer_type_tbl[customer_type_desc]),not(customer_type_tbl[customer_type_desc] in {"Author"}))).[gross sales]*[5 Yr Returns Ratio])

 

Add all the values to {"Author"}

 

 

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Perfect!  Thank you so much!

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.

Top Solution Authors