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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

DAX Help- Logical

Hello World!
Firstly Happy Holidays to all the people around the world. 

Capture.PNG
I want to create a new column Initial Mode. I have a dataset drom 2016-2022. 
Here I have created a Final Payment Mode column. It means the last mode of that particular person was Visa. 
If you look at the date, that person started from Decemeber 2021 and Ended in March 2022. In the very initial phase he had Mastercard Mode. 

Now, i am having a biggest challenge here. I want to create a new column which will give me his 1st payment mode which is mastercard( dec 2021) IN THIS CASE.  
(Note: You can see Final Payment mode Visa visa, twice in both rows. I will do distinct count at last) 
Capturesqs.PNG
I want a result like this. Column m (Initial Mode : Mastercard )
Please help. 

Thank you

1 ACCEPTED SOLUTION
Mahesh0016
Super User
Super User

Mahesh0016_0-1671597349889.png

Create Calculated Column :

Initial Mode = CALCULATE(MAX('Master&Visa'[Prior Mode]),FILTER('Master&Visa','Master&Visa'[Prior Year]<MAX('Master&Visa'[Prior Year])))

@Anonymous Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! 

View solution in original post

1 REPLY 1
Mahesh0016
Super User
Super User

Mahesh0016_0-1671597349889.png

Create Calculated Column :

Initial Mode = CALCULATE(MAX('Master&Visa'[Prior Mode]),FILTER('Master&Visa','Master&Visa'[Prior Year]<MAX('Master&Visa'[Prior Year])))

@Anonymous Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.