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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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