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.
I have a table in which I am calculatiing a countdown of days from the start of an event to find the average days to address the event. Once an event is addressed, a finished date is entered and the event completion duration can be calculated. If an event hasn't been addressed, the days continue to accumulate in the calculation. What I need is a measure that will divide the number of days an event is open divided by the overall count of records to get an average. But if an event isn't closed, I need the measure to return a value I have calculated in another column which is counting the number of days between event start and today. I have tried to use an IF statement to replace a blank with the field from the table but it won't work. Example:
Average Days for Event = IF(DIVIDE([Event Completion Duration], [Overall Event Count], [Running Days]
When an event hasn't been addressed, it shows as blank in the Event Completion Duration column. That's why I want it to then pull the value from the Running Days column but only in the case of a blank.
I am new to DAX and this has been the most complicated thing I've tried to address so far.
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, I create a sample and you can try like this.
1.Create the column “Event Completion Duration”.
2.Create the measure ”Average Days for Event”.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, I create a sample and you can try like this.
1.Create the column “Event Completion Duration”.
2.Create the measure ”Average Days for Event”.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
udhayakumarr28,
An example would be as follows:
There are 4 total events with an average depending on the value from event GHI. I have a measure that calculates the number of records overall and I have measures to calculate event duration and another return the running total based on today(). What I can't do is put them all together to give me the average days for completion including the event that has yet to be completed. I can calculate the average number of days for completed events but I can't get further than that.
Does that make more sense?
Hi @Anonymous, better you need to provide Sample Data and Expected results in an image so that we can easily understand your question.
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 |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |