I would like to be able to reference a column name based on a text variable, using something similar to the INDIRECT function in Excel.
I currently have a measure that selects between different time bins:
Highest Value = SWITCH(
[Selected Bin],
"Daily", MAXX( SUMMARIZE( 'data1', 'data1'[Daily], "M-UL", 'Measure Table'[UL] ), 'Measure Table'[UL]),
"Weekly",MAXX( SUMMARIZE( 'data1', 'data1'[Weekly], "M-UL", 'Measure Table'[UL] ), 'Measure Table'[UL]),
"Monthly",MAXX( SUMMARIZE( 'data1', 'data1'[Monthly], "M-UL", 'Measure Table'[UL] ), 'Measure Table'[UL]))
but it requires me to predefine the bins and use SWITCH to reference the specific column name in parameter 2 of the SUMMARIZE function.
What would be nice is if you would enable DAX to pass the text value of the measure [Selected Bin] indirectly to replace the individual column names ('data1'[Daily], 'data1'[Weekly], 'data1'[Monthly]) so that a fully dynamic measure would read something like this:
Highest Value No Switch = MAXX( SUMMARIZE( 'data1', INDIRECT([Selected Value], "M-UL", [UL] ), [UL] )
I have searched all the forums I know for a workaround and it just seems like a feature that ought to be included.
Let me know if you have any questions or want to see the PBIX of what I am proposing
Regards
Julian Straub
1 Comment
- fbcideas_migusrNew MemberStatus added:New
Recent ideas
Invoke Pipeline Task - Workspace Identity Authentication
Currently, the Fabric Data Factory Invoke Pipeline task uses the user's credentials who saved the pipeline to then authenticate to the Azure Data Factory to execute the ADF pipeline. When that user'...dzebrowitz13 minutes agoAdvocate IPlanned1.8KViews61likes5CommentsFabric Pipeline should run as workspace identity
Currently, Microsoft Fabric pipelines run under the identity of the last user who modified them, which can cause disruptions when tenant administrators make changes to security policies, such as enab...pellitteris22 minutes agoAdvocate IINew1.3KViews27likes3CommentsBring Back separating Power BI artifacts on a per web page basis
Previously, the ability to have different artifacts open on different web tabs was enabled. This was beneficial if you wanted to differentiate what environments you were in, working across three diff...zoe-dean1 hour agoNew MemberNew46Views8likes0CommentsREST API Should expose credentials used in connections
When a consultant leaves a client, it's important to clean up any connections that may have the consultants credentials embedded within. I'm able to use the Fabric CLI to get the managed connections ...PeterDaniels1 hour agoAdvocate IIINew18Views6likes0CommentsExpose full activity-level error details in Workspace Monitoring Eventhouse
Microsoft Fabric Workspace Monitoring exposes activity-level pipeline telemetry in FabricDataPipelinesActivityRunsLogs, including PipelineRunId, OperationId, ActivityIterationCount, ActivityName, Act...MarcoOnnis2 hours agoNew MemberNew2Views0likes0Comments