Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 |
---|---|
89 | |
82 | |
53 | |
40 | |
35 |