Summary
In this chapter, you have learned how to use helper tables to capture user input. Depending on your intended use, a helper table can be as simple as a few rows with options, or a larger list based on other data in the Power BI model. In most cases, helper tables have no relationships with other tables in the model. User input in the form of a selection in a slicer can be captured in DAX measures. The SWITCH
function is used to select the appropriate calculation based on the user input.
Keep in mind that when using multiple helper tables for dynamic selections, it is better to use an extended SWITCH
statement than to work with nested SWITCH
functions. Be aware that nesting can also occur through calling another measure that does its own SWITCH
. Piling up dynamic selectors like this can eventually lead to performance issues.
In the next chapter, we dive deeper into calendar-based analysis. While we have used several time-intelligence DAX functions in this chapter, many...