March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I need to calculate AvgPatients for coming 6 months using below linear and logorothemic trend formulas
My Data like this..
Hi @Anonymous ,
I'm not clear about the following formulas, could you please explain it with some examples? M,X,A,B and C in the formula means fields or something else? How are the data of the current date and the data of the future date calculated? And if it involve any calculation, please provide the related calculation logic. As checked the visual screenshot, there are 4 lines on it. What does each line represent?
- A -Linear trend formula: Y= M*X + C
- B -Logarithmic trend formula: Y= B1*ln(X) + B0
- Avg patients for coming 6 months = 70*A+ 30*B
Best Regards
Rena
Due to forecast single line issue, I am manually calculating liner trend.
I calculated liner trend using below formula in a mesure but how to calculate for coming 6 months and how to display forecast data in different color
Hi @Anonymous ,
You can refer the following threads to achieve it.
Forecasting Logic in Power BI with DAX
How to calculate future months
Best Regards
Rena
Calculated Liner regression Y= mx+c using below calculation
LinearTrend-A-MB =
VAR Known =
FILTER (
SELECTCOLUMNS (
CALCULATETABLE ( VALUES ( ConsumptionDate[DateNumber] ), ALLSELECTED (ConsumptionDate) ),
"Known[X]", 'ConsumptionDate'[DateNumber],
"Known[Y]", PatientsNormalized[A-MB]
),
AND ( NOT ( ISBLANK ( Known[X] ) ), NOT ( ISBLANK ( Known[Y] ) ) )
)
VAR Count_Items =
COUNTROWS ( Known )
VAR Sum_X =
SUMX ( Known, Known[X] )
VAR Sum_X2 =
SUMX ( Known, Known[X] ^ 2 )
VAR Sum_Y =
SUMX ( Known, Known[Y] )
VAR Sum_XY =
SUMX ( Known, Known[X] * Known[Y] )
VAR Average_X =
AVERAGEX ( Known, Known[X] )
VAR Average_Y =
AVERAGEX ( Known, Known[Y] )
VAR Slope =
DIVIDE (
Count_Items * Sum_XY - Sum_X * Sum_Y,
Count_Items * Sum_X2 - Sum_X ^ 2
)
VAR Intercept = Average_Y
- Slope * Average_X
RETURN
SUMX( DISTINCT ( ConsumptionDate[DateNumber] ),
Intercept + Slope * ConsumptionDate[DateNumber]
)
Please help me how to calculate logarithemic regression : Y = a + b * ln (X) ?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |