Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I want to create a measure that returns the number of units between 2 dates. I have went through so many different types of codes I may be over complicating this for myself. I have a table with the following type of data :
Contract ID | Units | Start Date | End Date |
123 | 11 | 01/01/2000 | 30/06/2018 |
123 | 10 | 01/07/2018 | 01/04/2021 |
123 | 12 | 02/04/2021 |
I want the measure to return the number of units. I have a chart with year as the axis but for some reason it doesnt seem to want to plot correctly to show how the number of unit changes over a given period of time.
For example a chart to show when the number of units changed from 10 to 12 etc between two dates. I am able to produce the below manually by using a chart but I need it as a measure to add to another chart:
Thanks
Solved! Go to Solution.
Hi Amitchadak,
It would be like the below. I just wish to have a measure that will show how the number of units has changed over the years:
THIS CODE WORKED:
@Matthew77
The data you have provided and the explanation are not sufficient to understand your problem.
Please share sample data and the expected results.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi I have added the example output
@Matthew77 , can you share the expected output?
I have two blogs they can offer some help
How to divide/distribute values between start date or end date or count days across months/days: https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...
Hi Amitchadak,
It would be like the below. I just wish to have a measure that will show how the number of units has changed over the years:
THIS CODE WORKED:
Actually after reloading that code seems to work! Thanks anyway 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
39 | |
35 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |