Forum Discussion
burakg
2 years agoNew Member
Default item calculation groups
Hi all, I've created a calculation group for time intelligence calculation. Due to the setup of our tooling, I need DAX to default to a default item if you don't select anything. Let's say I...
datalus
1 year agoNew Member
Calculation groups have been extended to support selection expressions which target your use case. You can define a 'noSelectionExpression' which is evaluated for any measure, whenever the parent calculation group is not-filtered. You can copy the 'Current period' calc item's expression in to the noSelectionExpression and this will be applied for any measure, not just [Total Sales]. If you want to avoid applying this expression to every measure, you can make an allow list by doing something like: SWITCH(SELECTEDMEASURENAME(), "Total Sales", ...., SELECTEDMEASURE()).