Forum Discussion
ericOnline
6 years agoPost Patron
MEASURE: Sum/Avg with Condition Question
Hello, I'm trying to create a measure that calculates the rank in one table based on conditions in another table. Example: Here are the tables and relationship: The measure I have now to c...
ericOnline
6 years agoPost Patron
For example, here is the problem I'm running into when using...
Budget Rank =
SUMX(
METRICS,
(CALCULATE(AVERAGEA(METRICS[BUDGET_RANK1]), ROLLUP[JOB_TITLE])) +
(CALCULATE(AVERAGEA(METRICS[BUDGET_RANK2]), ROLLUP[JOB_TITLE]))
)
/2...results in an error showin on the Card with details:
Error Message:
MdxScript(Model) (7, 72) Calculation error in measure 'METRICS'[Budget_Rank1]: Cannot convert value 'Supervisor' of type Text to type True/False.How can I write the measure in a generic enough way so that the Job_Title = the selected Job_Title in the Rollup Table vis?
ericOnline
6 years agoPost Patron
Here is a related post: https://community.powerbi.com/t5/Desktop/Calculated-Measure-with-conditions/m-p/1084638/highlight/true#M502294
Basically, how do I create a dynamic filter based on user selection?