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.
greeting good day every one
I'm new in the power bi and I need help for my work
PAT_DAYS_AP = SUM(Admit[Patient_DAYS_CAL])/60/60/24
I used this query to calculate the total days of month and when i select Feb it's show 126 days not 28 but before it use to work
Solved! Go to Solution.
COUNTROWS('Calendar') will work, assuming you have a calendar table- the same one you use to slice by dates, months or years.
Although you may wish to modify it with this:
CALCULATE(
COUNTROWS('Calendar'),
KEEPFILTERS('Calendar'[Date] < TODAY())
)
Hi @albatoul ,
What is this [Patient_DAYS_CAL] in your formula and what is the logic about the formula?
Does month slicer come from a date table or does it have a corresponding date?
If so you could use below measure.
Measure =
var eom = CALCULATE(ENDOFMONTH('CALENDAR'[Date]),FILTER('CALENDAR','CALENDAR'[Month]=SELECTEDVALUE('CALENDAR'[Month])))
return
DAY(eom)
Best Regards,
Jay
Hi @albatoul ,
What is this [Patient_DAYS_CAL] in your formula and what is the logic about the formula?
Does month slicer come from a date table or does it have a corresponding date?
If so you could use below measure.
Measure =
var eom = CALCULATE(ENDOFMONTH('CALENDAR'[Date]),FILTER('CALENDAR','CALENDAR'[Month]=SELECTEDVALUE('CALENDAR'[Month])))
return
DAY(eom)
Best Regards,
Jay
Good Day everyone
Please I need your help very argent I have dashboard that work perfectly fine but after I refresh it it's show negative numbers which is not correct
still not working do you think maybe this is not the wrong column I tried to take more information from my manger he told me that the problem is that
problem*
still not working 💔 the peoplem is i'm not the one who create the dashboard it's from old employee
We can create a new measure to overcome this.
Are we just trying to find out how many days were in the selected period?
In that case, if you have a calendar table (best practice), just use COUNTROWS(Calendar).
as I understand they want to show the months Days for Ex: FEB = 28 days and DEC = 31 days
COUNTROWS('Calendar') will work, assuming you have a calendar table- the same one you use to slice by dates, months or years.
Although you may wish to modify it with this:
CALCULATE(
COUNTROWS('Calendar'),
KEEPFILTERS('Calendar'[Date] < TODAY())
)
thank you for you answer
it's show "The value for 'Patient_DAYS_CAL' cannot be determined. Either the column doesn't exist, or there is no current row for this column."
Patient_DAYS_CAL isn't your date field.
What's the date field you use for slicing months?
How about (Day(ENDOFMONTH([ADMIN_DARE])), assuming that's your leading date.
Try
(Day(ENDOFMONTH([Your date field here]))
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 |
---|---|
97 | |
97 | |
82 | |
75 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |