The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi everyone,
I'm trying to find a dax code for the latest yes based on timetamp.
Example data:
I need the latest "Yes". In the example "18-11-2022 11:12"
Can anyone help me?
Thanks in advance.
Jeffrey
Solved! Go to Solution.
Hi, @Jeffrey_VC
try below
measure =
calculate(
max(tablename[timestamp]),
tablename[value]="yes",
allexcept(tablename,tablename[timestamp]),
tablename[deviceid]= max(tablename[deviceid])
)
Hi, @Jeffrey_VC
try below code
measure =
calculate(
max(tablename[timestamp]),
tablename[value]="yes",
allexcept(tablename,tablename[timestamp])
)
Thnx for your answer.
I tried and get the latest "yes" of the total. I also have a device id.
I need for every device id the latest "yes" 😀
Hi, @Jeffrey_VC
try below
measure =
calculate(
max(tablename[timestamp]),
tablename[value]="yes",
allexcept(tablename,tablename[timestamp]),
tablename[deviceid]= max(tablename[deviceid])
)
Works! Thnx.
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |