Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Team,
Good evening. Need help to get the expected output.i am attaching excel file, in that having two columns
1. Date and Invoice ID
2. I have given expected output column
Note: we need to compare invoice ID's with previous date, if it is not matching then "New" else if matches then "OLD". i tried different ways but unable get that.please help me.
please find the attached image for your reference.
Solved! Go to Solution.
Hi @aditya369_ ,
Please try below steps:
1. add a index column in Power Query Pane
2. create a measure with below dax formula
Measure =
VAR _idx =
SELECTEDVALUE ( 'Table'[Index] )
VAR _id =
SELECTEDVALUE ( 'Table'[Invoice ID] )
VAR tmp =
FILTER ( ALL ( 'Table' ), [Index] < _idx )
VAR _str =
CONCATENATEX ( tmp, [Invoice ID], "," )
VAR _val =
CONTAINSSTRING ( _str, _id )
RETURN
IF ( _val, "Old", "New" )
3. add a table visual with fileds and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @aditya369_ ,
Please try below steps:
1. add a index column in Power Query Pane
2. create a measure with below dax formula
Measure =
VAR _idx =
SELECTEDVALUE ( 'Table'[Index] )
VAR _id =
SELECTEDVALUE ( 'Table'[Invoice ID] )
VAR tmp =
FILTER ( ALL ( 'Table' ), [Index] < _idx )
VAR _str =
CONCATENATEX ( tmp, [Invoice ID], "," )
VAR _val =
CONTAINSSTRING ( _str, _id )
RETURN
IF ( _val, "Old", "New" )
3. add a table visual with fileds and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
143 | |
104 | |
104 | |
80 | |
66 |