Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Solved! Go to Solution.
Hello,
Couple notes. If you're using the filter function for the same table, then you can use && or || for multiple conditions.
Why don't you also say in your condition that complete date can't equal blank (just to test if that works)?
Also, I usually make an additional column for my week offset columns which is of a string type and I have a formula in there which says to rename the 0 to "Current Week". I do this because in the line charts or column charts it comes through quite nicely. Also, for all of the other prior weeks I call it Week -X.
Hi [User],
Thanks for reaching out to the Microsoft fabric community forum.
You're right the issue is that rows with blank DateComplete values cause Weekoffset to be blank, and those are being included in your count unless explicitly filtered out in the measure.
While using visual-level filters can hide those blanks, DAX measures require that condition to be written directly.
Here's the recommended fix:
WOCompCurrentWeek =
CALCULATE (
COUNTROWS ( 'workorders' ),
'workorders'[statusid] = 3,
'workorders'[DivisionType] = "HelpDesk",
NOT ISBLANK ( 'DatesTable'[Weekoffset] ),
'DatesTable'[Weekoffset] = 0
)
This ensures only work orders from the current week are counted, and blanks are excluded.
Thanks to @pbiuseruk and @Irwan for the suggestions especially around filtering logic and data modeling practices.
I hope this will resolve your issue, if you need any further assistance, feel free to reach out.
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thankyou.
Thanks but I have tried this and I am still getting the wrong numbers. The corect number is always one less than the measure...which I am guessing is the Blanks count.
Hello,
Couple notes. If you're using the filter function for the same table, then you can use && or || for multiple conditions.
Why don't you also say in your condition that complete date can't equal blank (just to test if that works)?
Also, I usually make an additional column for my week offset columns which is of a string type and I have a formula in there which says to rename the 0 to "Current Week". I do this because in the line charts or column charts it comes through quite nicely. Also, for all of the other prior weeks I call it Week -X.
So I actually changed by view for the dataset to include only completed workorders and changed the Measure to below and it is now working as expected. Thanks!
WorkordersCompCurrentWeek = COUNTROWS (
CALCULATETABLE (
'completedworkordersonly',
FILTER (
'completedworkordersonly',
'completedWorkordersonly'[DivisionType] = "HelpDesk"
),
FILTER (
'DatesTable',
('DatesTable'[Weekoffset] = 0)
)
)
)
Thanks...I tried added not isblank for datecomplete and it gives me the whole recordset. I will try your second suggestion.
hello @hmeltonPSL
i am not sure how you dataset looks like but do you think you can add another measure for removing blank from your countrow measure.
something like below.
COUNTX(
FILTER(
'workorders',
not ISBLANK('DatesTable'[Weekoffset])
),
[WOCompCurrentWeek]
)
Okay...I tried that but get an error on the measure.
A single value for column 'weekoffset' in table 'DatesTable' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single......
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 |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |