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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
fraitaan
Frequent Visitor

Calculate against a distribution curve

Hi, 

Won't be able to share data.

I work with warranty. Our product (3 different) already have a distribution curve of how many % of the products that could possibly break down during the warranty period. 

Period = Months
Attribute = Product(s)
Value = How many % is expected to be a warranty case

fraitaan_0-1671431372174.png

Picture 1: Showing part of the distribution curve


For every product made, we take away a small portion that will cover our warranty costs. 
So it's produced volume that month * small portion of the sales price = Init.Prov to cover our warranty costs

From the Init.Prov amount we calculate the expected cost. So it would be Init.Prov * Distribution Curve = Expected costs for that period

Thereafter we take Actual cost minus Expected cost to get the Delta (real cost)

Here is where the problems start, we are able to get the correct data in a waterfall chart but not able to detail it in a matrix/table. 
Problem seems to be that the subtotal and total of that year, the matrix want to Avg the % value but it should just sum the expected cost and not take Distribution curve * Init.Prov in the total. Right now the subtotal is the defining value, not each period/months. In the end calculation, the expected cost is about 75% to high than what it should be.

fraitaan_1-1671432424429.png

 

 

The formula that is used to calculate the expected cost, it works in the waterfall chart but not in a ordinary matrix:

 

 

Expected = LASTNONBLANK('DistributionCurve[Value], TRUE()) * [Provision]

 

 


Question: 

How can I stop/make a new DAX for the Matrix from averaging the DC-value for the sub-total/total?

2 REPLIES 2
Anonymous
Not applicable

Hi  @fraitaan ,

I created some data:

vyangliumsft_0-1671516463615.png

It's not very clear what you mean..... Are you referring to encountering calculations in the matrix that you want to be different at different levels?

You can use IF+ HASONEVALUE() to determine which level you are in and perform the corresponding calculation.

HASONEVALUE function (DAX) - DAX | Microsoft Learn

IF function (DAX) - DAX | Microsoft Learn

 

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
   HASONEVALUE('Table'[Month]),1,
   IF(
   HASONEVALUE('Table'[Year]),2,3))

 2. Result:

vyangliumsft_1-1671516463617.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi, 

Thanks for answer. 

Not sure if it will solve my problem.
At least I don't understand how to use it in my formula.

Period 1 (month) = Warranty cost should be 2% of init.prov
Period 2 (month) = Warranty cost should be 3% of init.prov
Period 3 (month) = Warranty cost should be 5% of init.prov

etc. 

The problem is that my matrix (after 1 whole year) is doing a avg. of the %-value and multiply it with the provision and use it in all my other calculations.

Month (Period)Init.ProvDistribution Curve (DC) (%)Expected 
Jan (1)1000025 (%)2500
Feb (2)1000023 (%)2300

Mars

10000212100
April10000181800
May10000161600
Jun10000131300
Jul10000111100
Aug100008800
Sep100005500
Oct100003300
Nov100002200
Dec100001100
Wrong Total (that my matrix do)12000012,16 (%)14592
Correct Total (That I want)120000(Blank)14600


I hope that I made it more understandable.
Should've made this illustration in the first post :)!

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.