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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
KellyM82
New Member

Help with DAX - Potential nested IF

Having exhausted all my google skills and after reading multiple different similar scenarios and having no joy, I thought I'd ask myself!

 

I'd like to create a measure that will determine what the status of a row within my data is by the date. Here is a sample of the data:

 

KellyM82_1-1672832453009.png

 

I thought perhaps I could use a measure with a nested IF statement to determine the appropriate date column and then return the attached status but I couldn't get it to work. In essence I'd like to be able to say "as at today I have x U status, y C status etc for the period 2022/23, on this day last year I had a U status, b C status etc for the period 2021/22". Hopefully that makes sense!

1 REPLY 1
amitchandak
Super User
Super User

@KellyM82 , Based on what I got.

Unpivot the date and status columns 

Split the new column having date and status names ( and others will have values.)

than one column will have a number and one will have values date and status.

Pivot the date/status column and values column

 

Pivot Data(Power Query) :https://www.youtube.com/watch?v=oKByyI09Bno&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=12

Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g

Power Query Split Column , Split Column By Delimiter: https://youtu.be/FyO9Vmhcfag

 

Then you can use latest logic

 

Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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