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.
Hi all, I need your help in creating a measure that shows the same results of the calculated column.
The calculated column is used on a line chart to count the overdue tasks at the end of each month of the year. To make the calculation, I have created a second calendar table (Calendar EOM) disconnected from the main calendar table and the fact table, where all the relantionship are ( Date Opened has an active relantionship with calendar date, teh other inactive with calendar date are date closed, expected date, and date validated).
The Expected date is the Due date and it is a calculated column based on the category and the number of days allowed to complete the task.
My issue is that I can't use the Overdue (in the screenshot above - Non Compliant) from the Calendar EOM) because I can't use the drillthrough function from the line chart even if I create the relantionship between the Calendar EOM and the fact table. The results are not correct. For clarity, I will copy the code behind the Calendar EOM, so that you can have a better understanding of the calculations behind.
Now the count is correct, I just want to reproduce it as a measure so that I can use it to drillthrough on a table visual.
So far the measure I got working is the following, but some totals are not the same, which is wrong:
What am I missing? Any help is much appreaciated.
Sample data below
Solved! Go to Solution.
I would think something more like below, but it needs additional logic to not count everything as overdue with future expected completion dates.
Overdue =
CALCULATE(COUNTROWS('Fact')
, USERELATIONSHIP('Fact'[Expected Completion Date], 'Calendar'[Date])
,'Fact'[Date Closed] > 'Fact'[Expected Completion Date ])
+ CALCULATE(COUNTROWS('Fact')
,USERELATIONSHIP('Fact'[Expected Completion Date], 'Calendar'[Date])
,ISBLANK('Fact'[Date Closed])
And you do not need that extra date table...
I would think something more like below, but it needs additional logic to not count everything as overdue with future expected completion dates.
Overdue =
CALCULATE(COUNTROWS('Fact')
, USERELATIONSHIP('Fact'[Expected Completion Date], 'Calendar'[Date])
,'Fact'[Date Closed] > 'Fact'[Expected Completion Date ])
+ CALCULATE(COUNTROWS('Fact')
,USERELATIONSHIP('Fact'[Expected Completion Date], 'Calendar'[Date])
,ISBLANK('Fact'[Date Closed])
And you do not need that extra date table...
I tried the measue as is above, and I'm not having the expected results. Anyway I will try to add more logic as you suggested.
Any other suggestion, please?
to be able to help I would need sample data and the exact expected numbers from that sample data.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |