Forum Discussion
Anonymous
4 years agoNot applicable
Identify 2 different rows under the same table
Hi All, I have the below table and use the slicer select report date. When the user selected 14-Feb to 28-Feb in the slicer. I want to compare all records from 14-Feb and 28-Feb. Identify which o...
- Anonymous4 years ago
Thanks all,
Let me take some time to apply the above solution and let you know the outcome.
Many thanksClement
johnt75
4 years agoSuper User
If you just need the numbers which are in the 3 categories ( first date only, second date only, both ) then you can create 3 measures like
First date only =
var minDate = MIN('Table'[Reporting Date])
var maxDate = MAX('Table'[Reporting Date])
var ordersFirstDate = CALCULATETABLE( VALUES('Table'[Order]), 'Table'[Reporting Date] = minDate)
var ordersSecondDate = CALCULATETABLE( VALUES('Table'[Order]), 'Table'[Reporting Date] = maxDate)
return COUNTROWS(EXCEPT( ordersFirstDate, ordersSecondDate ) )
Second date only =
var minDate = MIN('Table'[Reporting Date])
var maxDate = MAX('Table'[Reporting Date])
var ordersFirstDate = CALCULATETABLE( VALUES('Table'[Order]), 'Table'[Reporting Date] = minDate)
var ordersSecondDate = CALCULATETABLE( VALUES('Table'[Order]), 'Table'[Reporting Date] = maxDate)
return COUNTROWS(EXCEPT( ordersSecondDate, ordersFirstDate ) )
Both dates =
var minDate = MIN('Table'[Reporting Date])
var maxDate = MAX('Table'[Reporting Date])
var ordersFirstDate = CALCULATETABLE( VALUES('Table'[Order]), 'Table'[Reporting Date] = minDate)
var ordersSecondDate = CALCULATETABLE( VALUES('Table'[Order]), 'Table'[Reporting Date] = maxDate)
return COUNTROWS(INTERSECT( ordersSecondDate, ordersFirstDate ) )Anonymous
4 years agoNot applicable
Thanks all,
Let me take some time to apply the above solution and let you know the outcome.
Many thanks
Clement