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 ALL
I need a little help to adjust the following DAX function:
VAR FirstDay = STARTOFMONTH(dCalendar[ID Data])
RETURN
CALCULATE(SUM(fOportunies[total]),
fOportunies[status] ="open",
USERELATIONSHIP(dCalendar[ID Data],fOportunies[estimateddate]),
fOportunies[createdon] <= FirstDay
)
The adjustment that I need to do is change that VAR FirstDay should consider the 5º business day of each month.
I do have on dCalendar table a defined struture to set business day, with 0 for NO and 1 for YES (id date is or not a business day).
@EvertonRosa Probably need to ditch STARTOFMONTH and calculate your first day using something like MINX(FILTER(...),...) or CALCULATE(MIN(...),...) Hard to tell you specifically without a representation of your data. But basically filter to the same month and year and businessday = 1 and grab the min value.
This might help in the future: You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
Greg
Here is my dCalendar
Chech column "Dia Útil". In case, i do want to adjust filter/code:
fOportunies[createdon] <= FirstDay
"Firstday" should sum "Dia Útil" = 5 and get ID Data Value. Do you know how to do it?
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 |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |