Sometime we wants to use some aggregate function like MIN, MAX, COUNT, etc.. but that should be grouped by some dimension fields. In Power BI we just cant create a new column we MIN or MAX function. that will give us MIN and MAX value from the entire data set. So in order to achieve our requirement we need to use SUMMARIZE ().
Create a new Table use the below formula .
Groupedby_Table = SUMMARIZE (Dim1,Dim2,"Column Name 1 - Min", MIN(X),"Column Name 2 - Max", MAX(X))
Follow below example :
Employee_INOUT = SUMMARIZE(
'Access JournalLogView',
'Access Personnel'[Emp No],'Access Personnel'[Employee Name],'Access JournalLogView'[Entry/Exit Date].[Date],'Access Personnel'[Ref. Ind],
"Entry Time" , MIN('Access JournalLogView'[Entry/Exit Time]),
"Exit Time" , MAX('Access JournalLogView'[Entry/Exit Time]))
No comments:
Post a Comment