Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Arjunsmart_1994
Regular Visitor

Need to create a calculated column by using calculated measure

Hello Forum Team, 

use the below calculated measure and create a new calculated column as the same result come while comparing measure and column

Posted Quantity = VAR qty =
    CALCULATE (
        SUM ( Inventory[Quantity] ),
        USERELATIONSHIP ( 'Date Table'[Date], Inventory[Physical Date] ),
        'Invent Trans Utility'[Physically Posted] = "Yes"
    )
VAR offset =
    CALCULATE (
        SUM ( Inventory[Quantity Offset] ),
        'Invent Trans Utility'[Physically Posted] = "Yes"
    )
RETURN
    qty + offset
 
Thanks,
Arjun Reddy
2 REPLIES 2
Anonymous
Not applicable

Hi @Arjunsmart_1994 

 

Sorry, I don't quite understand what Inventory[Quantity], Inventory[Physical Date], 'Invent Trans Utility'[Physically Posted], Date Table'[Date] in your measure identify and how they are related.

Perhaps you could share a bit of your data (without sensitive information) or provide some sample data so we can help you better!

How to Get Your Question Answered Quickly - Page 13 - Microsoft Fabric Community

 

In addition, currently power bi does not support to use filter or slicer to create a dynamic calculate column.

 

Best Regards,

Zhengdong Xu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

123abc
Community Champion
Community Champion

To create a calculated column based on the provided calculated measure, you can use the following DAX formula. Assuming you want to create a new calculated column in the Inventory table, you can use the ADDCOLUMNS function along with the existing calculated measure.

 

NewCalculatedColumn =
ADDCOLUMNS (
FILTER (
'Inventory',
'Inventory'[Physically Posted] = "Yes"
),
"Posted Quantity",
[Posted Quantity]
)

 

This formula creates a new calculated column named NewCalculatedColumn in the Inventory table. It uses the ADDCOLUMNS function to iterate through each row of the table and calculate the value for the new column. The FILTER function is used to consider only rows where the 'Physically Posted' column is "Yes". For each of these rows, it assigns the value of the existing calculated measure [Posted Quantity] to the new column.

Make sure to replace 'Inventory', 'Physically Posted', and [Posted Quantity] with your actual table and column names if they are different. Also, ensure that the relationships between tables are set up correctly.

Keep in mind that calculated columns can impact performance, especially if the tables are large. If possible, consider using calculated measures in visuals instead of calculated columns for better performance.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.