The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have created the following calculated column in a PBI report using import query.
Column = CALCULATE(COUNTBLANK(Phone), FILTER(Family, Student[FamilyId] = Family[FamilyId])
where as the tables are as follows
Student ID | FamilyID |
1 | F1 |
2 | F2 |
3 | F1 |
4 | F3 |
5 | F2 |
FamilyID | Member | Phone |
F1 | Dad | 016-456-89876 |
F1 | Mom | |
F1 | Uncle | 676-876-98543 |
F2 | Dad | |
F2 | Mom | 412-562-88765 |
F3 | Dad | 416-542-86758 |
So Ideally, the output column would be
Student ID | column |
1 | 1 |
2 | 1 |
3 | 1 |
4 | 0 |
5 | 1 |
But, Now I have to create this report using DirectQuery connection. But when I try the same query, I'm not able to use the Calculate functions in the calculated column.
Can you pls help me with a solution for this issue?
Hi, @Anonymous
In fact, there are some limitations in calculating columns in direct query mode.
LEFT()
, that are allowed, are limited to those functions that can be pushed to the underlying source. The functions vary depending upon the exact capabilities of the source. Functions that aren't supported aren't listed in autocomplete when authoring the DAX for a calculated column, and would result in an error if used.
You can change the storage mode to Import. Go to the Model tab and select the target table, change the storage mode to Import in Advanced under Properties, and then create a new column.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
78 | |
77 | |
37 | |
33 | |
31 |
User | Count |
---|---|
92 | |
81 | |
58 | |
48 | |
48 |