Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
19 | |
14 | |
14 | |
13 | |
12 |