stijn2's avatar
stijn2
New Member
4 years ago
Status:
New

INDIRECT Function

Add a function to Power BI similar to the INDIRECT Function in Excel, so that you can dynamically refer to measures and tables by means of a string.

3 Comments

  • This would be a huge help to our organization as well. It would allow us to dynamically reference measures within DAX. It would allow for a lot of automation, especially for large dashboards with multiple KPIs.


    Essentially it would be the opposite of NAMEOF(). Instead of getting the name of a measure as a string, it takes as string with the name of a measure, and returns the measure or string.


  • Anonymous's avatar
    Anonymous
    Not applicable

    I've encountered a similar situation. I have been following some examples of how to make text that displays currently applied filters. This involves repeating the same code block for each column that is to be checked, and each block contains multiple references to the column, as when using the result of FILTERS the original column reference is used.


    If I could store a column reference in a VAR, this would mean only referring to it once per block, and this would allow the rest of each repeated block to be identical. This would make maintaining and updating the measure much easier. I suspect the block could even be changed to only appear once via CONTATENATEX tricks.


    It also seems that this would be an important building block for user functions: Microsoft Idea (powerbi.com) which would be much more powerful if they were able to use functions that need a column or table reference instead of just manipulating values.


Recent ideas