Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear Team,
I have calculated columns in data view calculated using dax code, i want those columns to appear in query editor to unpivot them. how do i write an M code to appear the calcualted columns in query editor ? or is there any alternative way to do.
Thanks in advance !
Solved! Go to Solution.
Hi @Baji_Komara ,
The reason for this is because all the columns displayed in the power bi query come from the original data source. If the measure or column created by dax on the powerbi desktop can only be displayed in the data visual, it will not appear in the power bi query. And Power Query uses another language called M with a very different syntax than DAX.
So if you'd like your new column to appear in Power Query, you have to create it in Power Query:
There are also many other features on Power Query that you can check to see if they meet your needs, not necessarily only writing M language..
Query overview in Power BI Desktop - Power BI | Microsoft Learn
This is the related document, you can view this content:
Solved: Is there a way to make calculated columns show in ... - Microsoft Power BI Community
Solved: Why won't new column added to table show up on Pow... - Microsoft Power BI Community
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is indeed a pity, but actually it is suggested to have calculated column as less as possible and try to do the data preparation with Power Query or even from the datasource.
Hi @Baji_Komara ,
The reason for this is because all the columns displayed in the power bi query come from the original data source. If the measure or column created by dax on the powerbi desktop can only be displayed in the data visual, it will not appear in the power bi query. And Power Query uses another language called M with a very different syntax than DAX.
So if you'd like your new column to appear in Power Query, you have to create it in Power Query:
There are also many other features on Power Query that you can check to see if they meet your needs, not necessarily only writing M language..
Query overview in Power BI Desktop - Power BI | Microsoft Learn
This is the related document, you can view this content:
Solved: Is there a way to make calculated columns show in ... - Microsoft Power BI Community
Solved: Why won't new column added to table show up on Pow... - Microsoft Power BI Community
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
In Power BI, there are two ways of adding custom columns for the table:
In order to get the columns in the Power Query to unpivot them those need to be created from the Power Query>> Add Column method.
If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.
Thanks!
Inogic Professional Services
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop and email at crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Hi @SamInogic ,
Thanks for your response !
I have calculate columns in data view which are created using complex DAX equtions and functions, not simple arthimetics, if i want to create them in query editor i have to write an M code and i don't know how to write M code to do all those complex calculations. so i want to create those calculated columns in data view want them to appear in query editor to unpivot them.
OR
@SamInogic is there any way to unpivot the columns in data view itself ?
Hope you understood my requirement.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
40 | |
20 | |
19 | |
15 | |
15 |
User | Count |
---|---|
47 | |
28 | |
25 | |
17 | |
17 |