Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX Help- Logical

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


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) 

I want a result like this. Column m (Initial Mode : Mastercard )
Please help. 

Thank you

  • 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 !! 

1 Reply

  • 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 !!