This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
hi, I know this is a classic problem that can be resolved with SUMX, but somehow, I couldn't get it done.
Here is the file:
https://1drv.ms/x/s!Aps8poidQa5zk5NCkQV_1tDZcbThRQ
I can't match the total as below:
thank in advance
Solved! Go to Solution.
In a single step, you can do like this
But i think better to create a second measure like in the earlier post
Demand in LT =
IF (
HASONEFILTER ( LT[Mat] ),
SUMX (
VALUES ( LT[Mat] ),
VAR newLT =
SUMX ( LT, LT[LT] )
VAR filtertable =
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] >= TODAY ()
&& 'Calendar'[Date] - TODAY ()
<= newLT
)
RETURN
CALCULATE ( SUM ( Demand[Demand] ), filtertable )
),
SUMX (
VALUES ( LT[Mat] ),
CALCULATE (
SUMX (
VALUES ( LT[Mat] ),
VAR newLT =
SUMX ( LT, LT[LT] )
VAR filtertable =
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] >= TODAY ()
&& 'Calendar'[Date] - TODAY ()
<= newLT
)
RETURN
CALCULATE ( SUM ( Demand[Demand] ), filtertable )
)
)
)
)
You can use this MEASURE
Measure =
IF (
HASONEFILTER ( LT[Mat] ),
[Demand in LT],
SUMX ( VALUES ( LT[Mat] ), [Demand in LT] )
)
thanks for the solution.
How can I combine the two measures: [Demand in LT], and [Measure 1] into 1 measure only?
I tried to put the same formula of [Demand in LT] into [Measure 1], but it didn't give the correct result.
Thanks
In a single step, you can do like this
But i think better to create a second measure like in the earlier post
Demand in LT =
IF (
HASONEFILTER ( LT[Mat] ),
SUMX (
VALUES ( LT[Mat] ),
VAR newLT =
SUMX ( LT, LT[LT] )
VAR filtertable =
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] >= TODAY ()
&& 'Calendar'[Date] - TODAY ()
<= newLT
)
RETURN
CALCULATE ( SUM ( Demand[Demand] ), filtertable )
),
SUMX (
VALUES ( LT[Mat] ),
CALCULATE (
SUMX (
VALUES ( LT[Mat] ),
VAR newLT =
SUMX ( LT, LT[LT] )
VAR filtertable =
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] >= TODAY ()
&& 'Calendar'[Date] - TODAY ()
<= newLT
)
RETURN
CALCULATE ( SUM ( Demand[Demand] ), filtertable )
)
)
)
)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 26 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 36 | |
| 32 | |
| 25 | |
| 23 |