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 everyone,
i need a dax function that automatically calculates the days and divides them by a sum. example:
- start: 01.01.2020
- End: 31.12.2020
- Amount: 10 000 €
Today: 16.11.2020 days from 01.01.2020 - 16.11.2020 are 320 days
=10,000/320 (number of days to date)*45 (number of days to 31.12.2020) The number of days should be calculated automatically.
Many thanks! Nuri
Unfortunately it did not work:
I have a date column. This column contains my start and end date. I want to calculate the number of days from 01.01.2020 to today with the help of a Dax-function.
I would like the number of days from 01.01.2020 to today and the number of days from today to 31.12.2020
@DagdasAlbag , not very clear, See if my attached file can help you .
Or the blog
@DagdasAlbag
Hope you need a calculated measure, you need something like:
Amount =
DIVIDE(
SUM(TABLE[AMOUNT]),
DATEDIFF( MAX(TABLE[STARTDATE]) , MAX(TABLE[EBDTDATE]),DAY)
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
42 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |