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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
juhoneyighot
Helper III
Helper III

Conditional DAX Formula

Hello!

 

I need help with the correct Count DAX formula ont this.I have this table (Time entry) I need to have the following:

 

1 Time-Off TYpe Column: Only those Vacation with Approve Status will have a Time Off Type. This is the condition:

 

juhoneyighot_1-1710868976657.png

If the Vacation is a Sick Leave Time Off TYpe is Sick Leave else Casual But then again, only those vacation with approved status is applicable on this

 

Thank you,

 

Juhoney

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @juhoneyighot ,

 

Please try:

Time Off Type = 
IF(
    AND([Type] = "Vacation", [Status] = "Approve"),
    SWITCH(
        [Description],
        "Sick Leave", "Sick Leave",
        "Casual"
    ),
    BLANK()
)

 

The page result is shown below:

vhuijieymsft_0-1710898148355.png

 

If you have any other questions please feel free to contact me.

 

The pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @juhoneyighot ,

 

Please try:

Time Off Type = 
IF(
    AND([Type] = "Vacation", [Status] = "Approve"),
    SWITCH(
        [Description],
        "Sick Leave", "Sick Leave",
        "Casual"
    ),
    BLANK()
)

 

The page result is shown below:

vhuijieymsft_0-1710898148355.png

 

If you have any other questions please feel free to contact me.

 

The pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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