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.
Hello,
I want to make a measurement that allows me to count the names of tasks like indicating on the red column using the second blue column named DateTime as a filter, indeed the data I want to visualize are the data of the last 24 hours. thank you for your help. So, as is shown in the picture the result will be 4.
My best regards. Thank you :).
Solved! Go to Solution.
Hi Hicham,
I have a solution that you can try.
You need to create a calculated column next to your date time. You can call it Hours ago.
It should look like this:
Hours ago = /*Years*/ (YEAR(NOW())-YEAR('Date'[Date]))*8760 + /*Month*/ (MONTH(NOW())-MONTH('Date'[Date]))*720 + /*Days*/ (DAY(NOW()) - DAY('Date'[Date]))*24 + /*Hours*/ HOUR(NOW())-HOUR('Date'[Date])
This will calculate the numbers of hours since todays date and time.
Of course you should switch the 'Date'[Date] with your datetime column unless you have a data model with a date table as well.
Then simply add this Hours ago column to the visual that contains your count measure.
If you don't have a count measure it could look like this:
No. of names := CALCULATE(DISTINCTCOUNT('Yourtablename'[Name Tasks]))
Best regards
Kaj
Hi Hicham,
I have a solution that you can try.
You need to create a calculated column next to your date time. You can call it Hours ago.
It should look like this:
Hours ago = /*Years*/ (YEAR(NOW())-YEAR('Date'[Date]))*8760 + /*Month*/ (MONTH(NOW())-MONTH('Date'[Date]))*720 + /*Days*/ (DAY(NOW()) - DAY('Date'[Date]))*24 + /*Hours*/ HOUR(NOW())-HOUR('Date'[Date])
This will calculate the numbers of hours since todays date and time.
Of course you should switch the 'Date'[Date] with your datetime column unless you have a data model with a date table as well.
Then simply add this Hours ago column to the visual that contains your count measure.
If you don't have a count measure it could look like this:
No. of names := CALCULATE(DISTINCTCOUNT('Yourtablename'[Name Tasks]))
Best regards
Kaj
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |