cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IamTDR Resolver I
Resolver I

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

Accepted Solutions
Super User IV
Super User IV

Re: Help with a Measure Total

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"}

 

 

 

 





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blog -Week is not so Weak Proud to be a Super User! Connect on Linkedin


View solution in original post

5 REPLIES 5
Super User IV
Super User IV

Re: Help with a Measure Total

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

 

 





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blog -Week is not so Weak Proud to be a Super User! Connect on Linkedin


IamTDR Resolver I
Resolver I

Re: Help with a Measure Total

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 Resolver I
Resolver I

Re: Help with a Measure Total

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])

Super User IV
Super User IV

Re: Help with a Measure Total

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"}

 

 

 

 





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blog -Week is not so Weak Proud to be a Super User! Connect on Linkedin


View solution in original post

IamTDR Resolver I
Resolver I

Re: Help with a Measure Total

Perfect!  Thank you so much!

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors