Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
hey guys, I have a data that looks like below:
and I want to show the latest time-out date, but if it's blank then it should show blank instead of the other log-out time like below:
Appreciate any help!
Solved! Go to Solution.
Hi,
I am not sure how your semantic mode looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Earliest timein: =
MINX (
SUMMARIZE ( data, user[user], data[time_in] ),
CALCULATE ( MIN ( data[time_in] ) )
)
Latest timeout: =
VAR _t =
SUMMARIZE ( data, user[user], data[time_in] )
VAR _result =
MAXX ( _t, CALCULATE ( MAX ( data[time_out] ) ) )
VAR _condition =
COUNTROWS ( FILTER ( _t, CALCULATE ( MAX ( data[time_out] ) ) = BLANK () ) ) > 0
RETURN
IF ( _condition, BLANK (), _result )
Hello @non23 ,
If I understand correctly, you want the earliest timein and latest timeout per user in two different measures.
Hello @non23 ,
If I understand correctly, you want the earliest timein and latest timeout per user in two different measures.
Hi,
I am not sure how your semantic mode looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Earliest timein: =
MINX (
SUMMARIZE ( data, user[user], data[time_in] ),
CALCULATE ( MIN ( data[time_in] ) )
)
Latest timeout: =
VAR _t =
SUMMARIZE ( data, user[user], data[time_in] )
VAR _result =
MAXX ( _t, CALCULATE ( MAX ( data[time_out] ) ) )
VAR _condition =
COUNTROWS ( FILTER ( _t, CALCULATE ( MAX ( data[time_out] ) ) = BLANK () ) ) > 0
RETURN
IF ( _condition, BLANK (), _result )
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |