Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey there Power Bi World,
I need your help.
Given is a tabel including three different informations.
The Asset, the Date and the Yield from the Asset.
monthly total for each asset is within the cell belonging to the first day of the month.
e.g Asset A monthly Yield in Jan = 31,
We do need a table converting this monthly value into daily values.
Take the given monthly total and divde it by the amount of days from this month.
e.g Asset A Daily Yield (Jan) = mtlyYield (31) / Days in Jan (31) = 1
Let's see what happens, butterflies in my stomach.
Thanks in advance
Solved! Go to Solution.
Hi @Mangnuel ,
Are you referring to the start date and end date inside the CALENDAR() function?
The parameters inside the CALENDAR() function can be customized to change, the date range is from the specified start date to the specified end date, including these two dates, if you want to use today as the last date inside the function, you can use the following dax.
CALENDAR(
DATE(2024,1,1),
TODAY())
Refer to:
CALENDAR function (DAX) - DAX | Microsoft Learn
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Mangnuel ,
Are you referring to the start date and end date inside the CALENDAR() function?
The parameters inside the CALENDAR() function can be customized to change, the date range is from the specified start date to the specified end date, including these two dates, if you want to use today as the last date inside the function, you can use the following dax.
CALENDAR(
DATE(2024,1,1),
TODAY())
Refer to:
CALENDAR function (DAX) - DAX | Microsoft Learn
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from lbendlin , please allow me to add some more information:
Hi @Mangnuel ,
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _datetable=
CALENDAR(
DATE(2024,1,1),
DATE(2024,3,31))
var _assettable=
DISTINCT('Table'[Asset])
var _addtable=
CROSSJOIN(
_assettable,_datetable)
RETURN
ADDCOLUMNS(
_addtable,
"Yield",
DIVIDE(
SUMX(
FILTER(ALL('Table'),
'Table'[Asset]=EARLIER([Asset])&&
YEAR('Table'[Date])=YEAR(EARLIER([Date]))&&
MONTH('Table'[Date])=MONTH(EARLIER([Date]))),
[Yield]),
DAY(EOMONTH([Date],0))))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hello @Anonymous
so far it's looling good, thanks a lot.
One question regarding the dates.
Beginning and ending is a static value.
Can the end by dynamic, something like today()....
You use a Calendar table in your data model, and then you use VALUES(Calendar[Date]) to get the number of days for each month. For example February 2024 was NOT 28 days...
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |