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 have the DAX below to create a measure that
- find those calls where the Planned Duration = 15 mins and the Delivered Duration is between 0 and 17 mins, and then total the Test Cost and multiply by Delivered Duration Decimal - can you see anything wrong with below? Its doing the first part just not multiplying the answer by the Delivered Duration Decimal
"DAX -
Solved! Go to Solution.
Let me assume that you are working at row level of source data table. In this case please try
Test New =
SUMX (
FILTER (
'Procurement_Main_Data',
'Procurement_Main_Data'[Planned Duration] = TIMEVALUE ( "00:15" )
&& 'Procurement_Main_Data'[Delivered Duration] >= TIMEVALUE ( "00:00" )
&& 'Procurement_Main_Data'[Planned Duration] <= TIMEVALUE ( "00:17" )
),
'Procurement_Main_Data'[Test Cost] * 'Procurement_Main_Data'[Delivered Duration Decimal]
)
Let me assume that you are working at row level of source data table. In this case please try
Test New =
SUMX (
FILTER (
'Procurement_Main_Data',
'Procurement_Main_Data'[Planned Duration] = TIMEVALUE ( "00:15" )
&& 'Procurement_Main_Data'[Delivered Duration] >= TIMEVALUE ( "00:00" )
&& 'Procurement_Main_Data'[Planned Duration] <= TIMEVALUE ( "00:17" )
),
'Procurement_Main_Data'[Test Cost] * 'Procurement_Main_Data'[Delivered Duration Decimal]
)
Thats worked !! Thank you so much your a star.
Ive took a braket out and got rid of the error but the Test New still doesnt say 0.56
Hi @spandy34
please try
Test New =
CALCULATE (
SUM ( 'Procurement_Main_Data'[Test Cost] ),
'Procurement_Main_Data'[Planned Duration] = TIMEVALUE ( "00:15" )
&& 'Procurement_Main_Data'[Delivered Duration] >= TIMEVALUE ( "00:00" )
&& VALUE ( 'Procurement_Main_Data'[Planned Duration] )
<= VALUE ( TIMEVALUE ( "00:17" ) ) * ( 'Procurement_Main_Data'[Delivered Duration Decimal] )
)
Thank you @tamerj1 for responding.
I have tried the DAX and I am getting 0.28 and I should be getting 0.56 - see below
Yes -
Perhaps you mean
Test New =
CALCULATE (
SUM ( 'Procurement_Main_Data'[Test Cost] ),
'Procurement_Main_Data'[Planned Duration] = TIMEVALUE ( "00:15" )
&& 'Procurement_Main_Data'[Delivered Duration] >= TIMEVALUE ( "00:00" )
&& 'Procurement_Main_Data'[Planned Duration] <= TIMEVALUE ( "00:17" )
) * 'Procurement_Main_Data'[Delivered Duration Decimal]
?
Ive tried ? and ) at the end of the DAX and get these errors
I get this error now
Ok so this a summarized column not a measure. Is it summarized by sum?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |