Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I tried to create a measure to set target based on model as shown below, however I got the error: Function 'SUMX' is not allowed as part of calculated column DAX expressions on DirectQuery models. Any help would be appreciated
Target =
SUMX (
'Table',
SWITCH (
TRUE (),
'Table'[Model] = "A", 10,
'Table'[Model] = "B", 20,
'Table'[Model] = "C", 30,
'Table'[Model] = "D", 40,
0
)
)
Hi @M-P,
Have you resolved your problem? If so, would you please mark the helpful reply as an answer or sharing your solution so that it can benefit more users?
Regards,
Yuliana Gu
Hi @M-P,
All DAX functions are supported for DirectQuery models. However, not all functions are supported for all formula types. Some functions like SUMX are supported in measure and query formulas only. For details: DAX Formula Compatibility in DirectQuery Mode
In your scenario, please new a measure rather than creating a calculated column using above formula.
Regards,
Yuliana Gu
Hi @M-P,
Could you please show us a sample ( with your needs) in order to understand your requests.
Thank you.
User | Count |
---|---|
81 | |
75 | |
73 | |
42 | |
36 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |