Forum Discussion
Calculating Single Measure from Different Start Dates
- 2 years ago
Remember that in Power BI, actions are very context-dependent.
For the total row, the default process that performs DAX reruns the same formula as for each row in the table. But that's not what you want.
Here's an example of a possible solution:
Answered Since Release =
if( isinscope(tabla[Class Key])
Result for Table Rows
,CALCULATE( SUM('User Call Details'[ACD Calls Answered]),
FILTER(DatesTable,
DatesTable[Date]>=max('Training Classes'[Training Release Date])))
resultao para la row de total
,
SUMX(
summarize(
board
,tabla[Class Key]
, 'Training Classes'[Training Release Date]
,"Total", CALCULATE( SUM('User Call Details'[ACD Calls Answered]),
FILTER(DatesTable,
DatesTable[Date]>=max('Training Classes'[Training Release Date])))
)
, [Total]
)
)
If you liked the answer, a kudo helps
Remember that in Power BI, actions are very context-dependent.
For the total row, the default process that performs DAX reruns the same formula as for each row in the table. But that's not what you want.
Here's an example of a possible solution:
Answered Since Release =
if( isinscope(tabla[Class Key])
Result for Table Rows
,CALCULATE( SUM('User Call Details'[ACD Calls Answered]),
FILTER(DatesTable,
DatesTable[Date]>=max('Training Classes'[Training Release Date])))
resultao para la row de total
,
SUMX(
summarize(
board
,tabla[Class Key]
, 'Training Classes'[Training Release Date]
,"Total", CALCULATE( SUM('User Call Details'[ACD Calls Answered]),
FILTER(DatesTable,
DatesTable[Date]>=max('Training Classes'[Training Release Date])))
)
, [Total]
)
)
If you liked the answer, a kudo helps
- frw2 years agoFrequent Visitor
Wow, thanks for the quick reply!
This seems to have solved the problem, so kudos for sure! I knew about the context-dependency, but I hadn't encountered it in a case like this. A summary table hadn't occured to me at all. There are some trickier calculations in this same vein I still need to tackle, but this is an awesome guide.I'd also never seen ISINSCOPE, which I could've used many, many times prior to this. Gracias!