dashboard dax help
1 TopicHow to reference column names dynamically to change Y value in line graph?
Hello, I am working through the following tips and tricks video: https://youtu.be/i1kCHZEhnEY?t=1539 and have a question about dynamic metrics. In his example, he is able to switch between Cost, Revenue, etc. I want to add another slicer that will change the Y Axis values from one column to another. Ex) selected_measure = var temp_key = SWITCH( TRUE(), "Kit Quantity" IN ALLSELECTED(QuantityTypeTable[Quantity Type]), "Kit Quantity", "Unit Quantity" IN ALLSELECTED(QuantityTypeTable[Quantity Type]), "Unit Quantity", // Default "Kit Quantity" ) RETURN SWITCH( TRUE(), SWITCH( TRUE(), "Actual" IN ALLSELECTED(AveragingTypeTable[Averaging Type]), CALCULATE(SUM('DataTable'[temp_key])), // Pretend the rolling average calculates the rolling average... "Rolling Average" IN ALLSELECTED(AveragingTypeTable[Averaging Type]), CALCULATE(SUM('DataTable'[temp_key])), CALCULATE(0) ) ) I want to be able to use a dynamic column so that I can use one LINE GRAPH and switch between the kit/unit quantity and the type of Y values (based on averaging or actual values). How do I make my calculation function dynamic such that it takes temp_key and uses that string as the column name in DataTable (for the red text)? Thanks!1.7KViews0likes0Comments