Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
42 | |
39 | |
19 | |
19 |