Forum Discussion
Dynamically select two columns in a table and filter to only show rows where the values differ
- Anonymous3 years ago
Hi megjarvis ,
According to your description, here are my steps you can follow as a solution.
(1) We can create measures.
First_month = var _min_date = MIN('Table'[Date]) var _max_date = MAX('Table'[Date]) var _min_status =MAXX( FILTER( 'Table' , 'Table'[Date]=_min_date) , [Status]) var _max_status = MAXX( FILTER( 'Table' , 'Table'[Date]=_max_date) , [Status]) return IF(_min_status <> _max_status , _min_status ,BLANK())Sencod_month = var _min_date = MIN('Table'[Date]) var _max_date = MAX('Table'[Date]) var _min_status =MAXX( FILTER( 'Table' , 'Table'[Date]=_min_date) , [Status]) var _max_status = MAXX( FILTER( 'Table' , 'Table'[Date]=_max_date) , [Status]) return IF(_min_status <> _max_status , _max_status ,BLANK())Change = var _cur_first = [First_month] var _cur_second = [Sencod_month] return SWITCH(TRUE(),[First_month]="Pending"&&[Sencod_month]="In Progress","Started" , [First_month]="Pending"&&[Sencod_month]="Complete","Started & Finished" , [First_month]="In Progress"&&[Sencod_month]="Complete","Finished" )(2) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi megjarvis ,
Please refer to the following posts:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, I've updated my post with images and a link to the mock data.
- Anonymous3 years agoNot applicable
Hi megjarvis ,
According to your description, here are my steps you can follow as a solution.
(1) We can create measures.
First_month = var _min_date = MIN('Table'[Date]) var _max_date = MAX('Table'[Date]) var _min_status =MAXX( FILTER( 'Table' , 'Table'[Date]=_min_date) , [Status]) var _max_status = MAXX( FILTER( 'Table' , 'Table'[Date]=_max_date) , [Status]) return IF(_min_status <> _max_status , _min_status ,BLANK())Sencod_month = var _min_date = MIN('Table'[Date]) var _max_date = MAX('Table'[Date]) var _min_status =MAXX( FILTER( 'Table' , 'Table'[Date]=_min_date) , [Status]) var _max_status = MAXX( FILTER( 'Table' , 'Table'[Date]=_max_date) , [Status]) return IF(_min_status <> _max_status , _max_status ,BLANK())Change = var _cur_first = [First_month] var _cur_second = [Sencod_month] return SWITCH(TRUE(),[First_month]="Pending"&&[Sencod_month]="In Progress","Started" , [First_month]="Pending"&&[Sencod_month]="Complete","Started & Finished" , [First_month]="In Progress"&&[Sencod_month]="Complete","Finished" )(2) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.