Forum Discussion
Finding column values based on two different Values of same table
- 6 years ago
Yor are Awesome Kelly!!
It Works!!Now user Wants to display data as in below format
id idDate Cid CidDate Date Diff 1 4/08/2020 7:59:51 PM 2 4/08/2020 6:26:20 PM 5611 3 4/08/2020 8:03:47 PM 4 4/08/2020 8:03:47 PM 0
Will it be Possible?I am exploring some options.
Thank you very much for your help.
Hi PBILover,
For question 1---->
Is it possible instead of displaying Table[id] we can display table[cid] in the following code?
IF('Table'[Id] in _cid,'Table'[Id],BLANK())No,you cant, this expression is to find the rows where the Id equals the cid list,so you can only get the id value back,but it doesnt matter,as the id values returned is exactly the cid values.
For question 2--------->
If you wanna use aggregation for the values,then create a calculated column as below:
Datediff =
var anotherdate =IF('Table'[_Markrow]=BLANK(),BLANK(),CALCULATE(MAX('Table'[Date]),FILTER('Table','Table'[cid]=EARLIER('Table'[_Markrow])))) return
DATEDIFF('Table'[Date],anotherdate,SECOND)
And you will see:
Here is the modified .pbix file you can refer to .
Kelly
Yor are Awesome Kelly!!
It Works!!
Now user Wants to display data as in below format
| id | idDate | Cid | CidDate | Date Diff |
| 1 | 4/08/2020 7:59:51 PM | 2 | 4/08/2020 6:26:20 PM | 5611 |
| 3 | 4/08/2020 8:03:47 PM | 4 | 4/08/2020 8:03:47 PM | 0 |
Will it be Possible?
I am exploring some options.
Thank you very much for your help.