Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I can do this easily using the the filter, but I really want to do it using DAX.
I've tried multiple "lastdate" variations but i'm not sure the syntext to move it back 7 or 14 days.
I have a the below table and i simply want a DAX that counts the number of devices that last log on in the past 7 days. i'll replacate that formular to then account for the last 14 days.
Device Name | Last Logon Date | Confidence Level |
AAA | Jan 29 | Medium |
BBB | Jan 3 | High |
CC | April 21 | Medium |
Solved! Go to Solution.
Hi @sharpedogs
try
Measure = CALCULATE(COUNTROWS('Table');'Table'[Last Logon Date]>=today()-7)
do not hesitate to give a kudo to useful posts and mark solutions as solution
try
Measure = CALCULATE(COUNTROWS('Table');'Table'[Last Logon Date]>=today()-14;'Table'[Last Logon Date]<=today()-7)
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi @sharpedogs
try
Measure = CALCULATE(COUNTROWS('Table');'Table'[Last Logon Date]>=today()-7)
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi, wondering if i can piggyback on my ask 🙂
Instead of the last 7 days... what if i now wanted a range say between 7 and 14 days? I'm not sure what i do with the TODAY () function so that is starts at 7 days?
try
Measure = CALCULATE(COUNTROWS('Table');'Table'[Last Logon Date]>=today()-14;'Table'[Last Logon Date]<=today()-7)
do not hesitate to give a kudo to useful posts and mark solutions as solution
Why is it so simply when you provide the answer....lol
Thanks
it's a practice question.
good luck and welcome to power bi! 🙂
Tried.... and worked perfectly!!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |