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 have a problem with exlcuding week-ends again... There are lots of suggestions on inyternet and I tried many of them, but still getting error.. I created a separate date table and I would like to calculate difference between Closed date and Approved date..
Solved! Go to Solution.
Hi, @KatkaS
According to your description and DAX formula, I guess that you want to get the difference between the count of dates between Approved Date and Closed Date in a period of dates, right?
If so, you can try my steps:
Calendar = CALENDAR(DATE(2021,1,1),DATE(2021,12,31 ))
Day =
var _weekday=WEEKDAY([Date],2)
return
IF(_weekday>=6,"Closed Date" ,"Approved Date")
Difference =
var _approved=COUNTX(FILTER(ALL('Calendar'),[Day]="Approved Date"),[Date])
var _closed= COUNTX(FILTER(ALL('Calendar'),[Day]="Closed Date"),[Date])
return
_approved-_closed
Then I create a card chart an place this measure, I can get the correct count, like this:
I guess this can be what you want.
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @KatkaS
According to your description and DAX formula, I guess that you want to get the difference between the count of dates between Approved Date and Closed Date in a period of dates, right?
If so, you can try my steps:
Calendar = CALENDAR(DATE(2021,1,1),DATE(2021,12,31 ))
Day =
var _weekday=WEEKDAY([Date],2)
return
IF(_weekday>=6,"Closed Date" ,"Approved Date")
Difference =
var _approved=COUNTX(FILTER(ALL('Calendar'),[Day]="Approved Date"),[Date])
var _closed= COUNTX(FILTER(ALL('Calendar'),[Day]="Closed Date"),[Date])
return
_approved-_closed
Then I create a card chart an place this measure, I can get the correct count, like this:
I guess this can be what you want.
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @KatkaS
Upload the PBIX file to OneDrive or Dropbox then post a link to it in here.
regards
Phil
Proud to be a Super User!
Hi @KatkaS
What exactly is the issue? That DAX looks ok.
Can you please provide your data/PBIX file.
Regards
Phil
Proud to be a Super User!
Hello Philip,
it seems the date format was wrong, not the DAX... but now I have an issue with null in the date field..
Can I send the dashboard to you..? How? Thank you very much!
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 |
---|---|
106 | |
97 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |