Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Name | WorkOrder | WorkStation | Check in Time | Check out time | unique declaration |
Alpha | A | K10 | 02/01/2021 14:00 | 02/01/2021 15:30 | 1 |
Alpha | A | K20 | 04/01/2021 13:30 | 04/01/2021 14;51 | 1 |
Beta | B | K10 | 02/01/2021 21:00 | 02/01/2021 21:31 | |
Beta | B | K10 | 03/01/2021 22:00 | 03/01/2021 22:30 | 1 |
Beta | C | K20 | 04/01/2021 12:00 | 04/01/2021 13:30 | 1 |
So basically i want to count the number of times people check out by unique workstation and unique workorder but I don't know how to approach this issue. Anyone can help me generate the "unique declaration" column? Thanks a lot!
Solved! Go to Solution.
Hi @Stan_Lego ,
I created a sample pbix file(see attachment), please check whether that is what you want.
1. Create a measure as below to get the unique declaration
unique declaration =
VAR _maxdate =
CALCULATE (
MAX ( 'Table'[Check out time] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[WorkOrder] = SELECTEDVALUE ( 'Table'[WorkOrder] )
&& 'Table'[WorkStation] = SELECTEDVALUE ( 'Table'[WorkStation] )
)
)
VAR _tab =
SUMMARIZE (
'Table',
'Table'[WorkOrder],
'Table'[WorkStation],
"@countofws", CALCULATE ( DISTINCTCOUNT ( 'Table'[WorkStation] ) )
)
RETURN
IF (
SELECTEDVALUE ( 'Table'[Check out time] ) = _maxdate,
SUMX ( _tab, [@countofws] ),
BLANK ()
)
Best Regards
Hi @Stan_Lego ,
I created a sample pbix file(see attachment), please check whether that is what you want.
1. Create a measure as below to get the unique declaration
unique declaration =
VAR _maxdate =
CALCULATE (
MAX ( 'Table'[Check out time] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[WorkOrder] = SELECTEDVALUE ( 'Table'[WorkOrder] )
&& 'Table'[WorkStation] = SELECTEDVALUE ( 'Table'[WorkStation] )
)
)
VAR _tab =
SUMMARIZE (
'Table',
'Table'[WorkOrder],
'Table'[WorkStation],
"@countofws", CALCULATE ( DISTINCTCOUNT ( 'Table'[WorkStation] ) )
)
RETURN
IF (
SELECTEDVALUE ( 'Table'[Check out time] ) = _maxdate,
SUMX ( _tab, [@countofws] ),
BLANK ()
)
Best Regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
80 | |
65 | |
52 | |
49 |
User | Count |
---|---|
212 | |
89 | |
79 | |
68 | |
60 |