The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have created a Linestx dax as -
Solved! Go to Solution.
@Ethanhunt123 , Try using below
TempTable =
VAR line =
LINESTX (
ALLSELECTED('Sales order line fact'[Order month]), -- This respects the slicer
[Total revenue trend],
'Sales order line fact'[Order month]
)
VAR slope = SELECTCOLUMNS(line, [Slope1])
VAR intercept = SELECTCOLUMNS(line, [Intercept])
RETURN
ADDCOLUMNS(
SUMMARIZE(
'Sales order line fact',
'Sales order line fact'[Order month]
),
"Slope", slope,
"Intercept", intercept,
"Revenue Trend", 'Sales order line fact'[Order month] * slope + intercept
)
Proud to be a Super User! |
|
@Ethanhunt123 , Try using below
TempTable =
VAR line =
LINESTX (
ALLSELECTED('Sales order line fact'[Order month]), -- This respects the slicer
[Total revenue trend],
'Sales order line fact'[Order month]
)
VAR slope = SELECTCOLUMNS(line, [Slope1])
VAR intercept = SELECTCOLUMNS(line, [Intercept])
RETURN
ADDCOLUMNS(
SUMMARIZE(
'Sales order line fact',
'Sales order line fact'[Order month]
),
"Slope", slope,
"Intercept", intercept,
"Revenue Trend", 'Sales order line fact'[Order month] * slope + intercept
)
Proud to be a Super User! |
|
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |