Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
When i try to create a calculated column in the power bi (32-bit) in Direct Query mode. I got error on the dax function.
I went to settings, but i dont see the option and enable unrestricted measures.
Can anyone help on this?
Thanks in advance
Solved! Go to Solution.
@wuhao0506,
Do you use Power BI Desktop August version ? Based on mye test, even we enable unrestricted measures, it is not possible to use DATEDIFF function in calculated columns in DirectQuery mode. However, you can create a measure instead.
Measure = IF(MAX('Project-Activity'[PLANNED_START_DATE])<'Project-Activity'[DATADATE],DATEDIFF(MAX('Project-Activity'[PLANNED_START_DATE]),'Project-Activity'[DATADATE],DAY),DATEDIFF('Project-Activity'[DATADATE],MAX('Project-Activity'[PLANNED_START_DATE]),DAY))
Regards,
Lydia
@wuhao0506,
Do you use Power BI Desktop August version ? Based on mye test, even we enable unrestricted measures, it is not possible to use DATEDIFF function in calculated columns in DirectQuery mode. However, you can create a measure instead.
Measure = IF(MAX('Project-Activity'[PLANNED_START_DATE])<'Project-Activity'[DATADATE],DATEDIFF(MAX('Project-Activity'[PLANNED_START_DATE]),'Project-Activity'[DATADATE],DAY),DATEDIFF('Project-Activity'[DATADATE],MAX('Project-Activity'[PLANNED_START_DATE]),DAY))
Regards,
Lydia
I thing this is unnacceptable solution, since making this a calculation will restrict your later transformations. I'm trying for over a week to do this calculation for a calculated column and it seems impossible. Why you do that, Microsoft?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
118 | |
84 | |
49 | |
38 | |
30 |
User | Count |
---|---|
188 | |
76 | |
73 | |
54 | |
45 |