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
zan3gerous
New Member

Assistance with a custom query to create a new column

Thanks for checking out my post! I really appreciate any help offered. 

 

Im trying to make a new column in my query that is based off of two other columns, "CISA KEV Status", which has two values of either "CISA KEV" or "Not CISA KEV" & another column called "Days to mitigate" which has values in whole numbers, ranging from 0-30.

 

I want this new column to show only the days to mitigate for values which are "CISA KEV", and for "Not CISA KEV" to be excluded, or zeroed.

 

thank you in advance!

1 ACCEPTED SOLUTION
divyed
Super User
Super User

Hello @zan3gerous ,

 

You can create a column using below dax

New_Column =
IF(
    'CISA'[CISA_Status] = "CISA KEV",
    CISA[Days_to_Mitigate],
    0
)
 
divyed_0-1729692394804.png

 

If you need filtered table, use 

 

Only_CISA_KEV =
FILTER(CISA,CISA[CISA_Status] ="CISA KEV")
 
divyed_1-1729692860920.png

 

 

If you need different output, attached a sample please.

 

I hope I answered the query. If yes, mark this as solution. Appreciate Kudos always 🙂

 

Cheers

LinkedIn : https://www.linkedin.com/in/neeraj-kumar-62246b26/

View solution in original post

1 REPLY 1
divyed
Super User
Super User

Hello @zan3gerous ,

 

You can create a column using below dax

New_Column =
IF(
    'CISA'[CISA_Status] = "CISA KEV",
    CISA[Days_to_Mitigate],
    0
)
 
divyed_0-1729692394804.png

 

If you need filtered table, use 

 

Only_CISA_KEV =
FILTER(CISA,CISA[CISA_Status] ="CISA KEV")
 
divyed_1-1729692860920.png

 

 

If you need different output, attached a sample please.

 

I hope I answered the query. If yes, mark this as solution. Appreciate Kudos always 🙂

 

Cheers

LinkedIn : https://www.linkedin.com/in/neeraj-kumar-62246b26/

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.