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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
DemoFour
Responsive Resident
Responsive Resident

Dax to get a column to return days linked to a set code

Hi, I am completely new to all of this! So please bare with me.

 

I have table as follows

 

Property Code - Total Period Charge - VOID Code - VOID Description - VOID Phase Sequence - First Phase Start Date - Last Phase end Date

 

I added an additional column using the following:

 

(Column) Days Void = 1.* 'Void Phase analyses'[Last Phase End Date] - 'Void Phase analyses'[First Phase Start Date]

 

This worked and now my new column tells me how many days void there has been.

 

So my questions is:

 

I want a column to tell me the number of days Void for each of the VOID Code categories.

 

In the Void Categories column is different codes for  Read to Let, Minor Repair, Major Repair, Do Not Use etc.

 

but I cant write something that tells me if [VOID Code] = MINRP (or MAJRP or DNU etc.) then [Last Phase End Date] - [First Phase End Date] = the days it was void (according to the reason it was void).

 

any help in leading me in the right direction would be much appreciated.

 

Kind regards

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@DemoFour,

 

You may take a look at IF Function and IN Function.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@DemoFour,

 

You may take a look at IF Function and IN Function.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors