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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Pratiksha1
New Member

Creating a dynamic calculated column

Hi all, I am new to PowerBI and I am facing a challenge with creating a calculated column that will get updated automatically as the dataset keeps getting filtered. My dataset looks like this - 

Pratiksha1_0-1656393637679.png


I have created the Deliverable_Milestone_Match column using the formula - 

Deliverable_Milestone_Match = if(Sheet1[Issue_Type] = "CO Deliverable", VAR _sel = SELECTCOLUMNS(Sheet1, "MilestoneIssueKey", [Issue_Key]) RETURN IF( Sheet1[MilestoneIssueKey] IN _sel, "MAPPED","UNMAPPED"),"MILESTONE")

Now, the challenge is, I will need to apply some filters on this dataset, and since my calculated column references other columns in the data, it also needs to change accordingly. For example: The formula is looking up the presence of MilestoneIssueKey in Issue_Key, and it is populating MAPPED if it gets a match, and UNMAPPED otherwise. Now, if I apply a filter that removes a specific unique Issue_Key, then the corresponding MilestoneIssueKey won't have a match anymore, and the Deliverable_Milestone_Match value should change to UNMAPPED now.

I would really appreciate if anyone can help me on this. I am not even sure if this can be achieved via DAX or whether I will need to use Power Query for this.

Thanks in advance!
2 REPLIES 2
Hariharan_R
Solution Sage
Solution Sage

Hi @Pratiksha1 

If you need to handle the dynamic filters for your logic then create measures instead of calculated columns. 

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


Hey thanks for your response! But I will need to make columns only. Is there any way to perform the task by creating columns?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.