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.
The output of a calculated measure (see Figure # 3 below) is not changing in response slicer selections in a visualization of a related (primary or central) table (see Figure #’s 4, 5, 6 below).
However, a different instantiation of the same measure using identical syntax in the visualization sheet (see Figure #4 below) and, presumably, a different context is changing in response to slicer selections (see Figure #’s 5, 6).
So clearly the context of the [PerfMin#] calculation in the related ‘Perf Rating Scale’ lookup table (see Figure #3) is not correct.
I’ve tried numerous options with both syntax (referencing or not referencing table and/or column, etc) and DAX functions (RELATEDTABLE, ALLEXCEPT, et al) without success.
Since we have different rating distribution targets for each performance rating level, the objective of the [PerfMin#] and [PerfMax#] measure is to calculate specific target range #’s based on the resultant count of employees (rows) for any given slicer selection.
So the final or desired [PerfMin#] measure would be as follows:
PerfMin# = CALCULATE( COUNTROWS('Calibration Detail Data'), ALLSELECTED('Calibration Detail Data') ) * ('Perf Rating Scale'[PerfMin%]/100)
[Note that the right operand, “… ('Perf Rating Scale'[PerfMin%]/100) …”, was dropped in the examples below to better highlight that the left operand result was not changing in response to slicer selections.]
The correct results for the selections, or lack of selections, shown in Figure #’s 4, 5, 6 are captured in Figure #’s 7, 8, 9 (see below).
The ultimate objective is to plot [PerfMin#] and [PerfMax#] on the Performance Rating Distribution graph to how the actual ratings compare to the target ratings.
Any suggestions on how to solve this problem?
Thanks,
Solved! Go to Solution.
Thanks for reply Cherie
Thought about this approach but wasn't sure it would use the correct percentages for each different performance rating.
After referencing the correct table, the calculated measure seems to generate the correct results!
Here's the updated expression:
PerfMin# =
VAR a =
CALCULATE (
COUNTROWS ( 'Calibration Detail Data' ),
ALLSELECTED ( 'Calibration Detail Data' )
)
RETURN
CALCULATE ( a * MAX ( 'Perf Rating Scale'[PerfMin%] ) / 100 )
Thanks for your help,
Hi @raimund
You may try to create a measure instead of calculated column for PerfMin# as below:
PerfMin# = VAR a = CALCULATE ( COUNTROWS ( 'Calibration Detail Data' ), ALLSELECTED ( 'Calibration Detail Data' ) ) RETURN CALCULATE ( a * MAX ( 'Calibration Detail Data'[PerMin%] ) / 100 )
Regards,
Cherie
Thanks for reply Cherie
Thought about this approach but wasn't sure it would use the correct percentages for each different performance rating.
After referencing the correct table, the calculated measure seems to generate the correct results!
Here's the updated expression:
PerfMin# =
VAR a =
CALCULATE (
COUNTROWS ( 'Calibration Detail Data' ),
ALLSELECTED ( 'Calibration Detail Data' )
)
RETURN
CALCULATE ( a * MAX ( 'Perf Rating Scale'[PerfMin%] ) / 100 )
Thanks for your help,
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |