Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I want to calculate the number of days on the basis of the Dates provided in the page filter using a DAX measure. For e.g if the 'Start Date' is on or after 1-Nov-2020 & 'End Date' is on or before 17-Dec-2020, we should get the output as 47 i.e. no.of days between start & end date. Please find the below snapshot for better understanding.
I tried using below measure but its not working.
NoOfDaysBetween=DATEDIFF(SELECTEDVALUE('TimeZone'[Begin]),SELECTEDVALUE('TimeZone'[End])
Thanks!
maybe try
NoOfDaysBetween=DATEDIFF(MAX('TimeZone'[Begin]),MAX('TimeZone'[End]),DAY)
Thanks for your response @eliasayyy . The above DAX doesn't give the desired output.
do you mind sharing sample dataset and the resuts
Sure, PFB
ok it seems you are using the same table in the filter thsi wont work in the filter panel due to when you first filter the begining date to the date , you will only have rows in the start of the date if the end date isnt in the rows it will return 0. can i se ethe table ?
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
16 | |
16 | |
16 |
User | Count |
---|---|
27 | |
26 | |
19 | |
15 | |
14 |