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 matrix that shows three measures Billed_Hours, Unbilled_Hours, and Total_Hours for each project project.
The formula for the measure Billed_Hours is :
Solved! Go to Solution.
Hi @arunbyc
Yes, you can eliminate projects with zero Billed_Hours and Unbilled_Hours from your matrix visual without using the filter pane by modifying your DAX measures to return BLANK()
when both values are zero. When all measures in a row return BLANK()
, Power BI automatically hides that row in visuals like the matrix.
Here's how you can adjust your measures:
Billed_Hours =
VAR BilledHr = CALCULATE(SUM(project_time[hours]), project_time[is_billed] = TRUE)
RETURN
IF(BilledHr = 0 || ISBLANK(BilledHr), BLANK(), BilledHr)
Unbilled_Hours =
VAR UnbilledHr = CALCULATE(SUM(project_time[hours]), project_time[is_billed] = FALSE)
RETURN
IF(UnbilledHr = 0 || ISBLANK(UnbilledHr), BLANK(), UnbilledHr)
Total_Hours =
VAR TotalHr = [Billed_Hours] + [Unbilled_Hours]
RETURN
IF(
ISBLANK([Billed_Hours]) && ISBLANK([Unbilled_Hours]),
BLANK(),
TotalHr
)
Explanation:
BLANK()
accordingly.BLANK()
will not display, as Power BI hides rows where all measures are blank.Additional Tips:
Benefits:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Hi @arunbyc
Yes, it is possible to eliminate projects with both billed and unbilled hours equal to zero from your matrix visual using a DAX measure. You can create a measure that checks if both Billed_Hours and Unbilled_Hours are zero and then use this measure as a filter in your matrix visual.
Here's how you can do it:
Create a Measure to Check for Zero Hours: Create a new measure that checks if both Billed_Hours and Unbilled_Hours are zero.
ShowProject =
IF ( [Billed_Hours] = 0 && [Unbilled_Hours] = 0, 0, 1 )
Use the Measure as a Visual Filter: Add this new measure to the filter pane of your matrix visual and set the filter to show only projects where ShowProject is equal to 1.
Here's a step-by-step guide:
Go to the Modeling tab in Power BI Desktop.
Click on New Measure.
Enter the DAX formula for the ShowProject measure.
Add the ShowProject measure to the filter pane of your matrix visual.
Set the filter condition to ShowProject is equal to 1.
This will ensure that only projects with non-zero billed or unbilled hours are displayed in your matrix visual.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Hi : Thanks for your reply. My isEmpty(project_time) measure inserted into the filter pane is doing the exact same thing you suggested. The zeros are actually blanks, so the filtered table will be empty. I am trying not to use the filter pane. I get worried that, at a later date, people may not realize there is something in the filter pane when troubleshooting any issues. (Happens to me many times). I am trying to see if there is any way to not use the filter pane but still get this result.
Hi @arunbyc
Yes, you can eliminate projects with zero Billed_Hours and Unbilled_Hours from your matrix visual without using the filter pane by modifying your DAX measures to return BLANK()
when both values are zero. When all measures in a row return BLANK()
, Power BI automatically hides that row in visuals like the matrix.
Here's how you can adjust your measures:
Billed_Hours =
VAR BilledHr = CALCULATE(SUM(project_time[hours]), project_time[is_billed] = TRUE)
RETURN
IF(BilledHr = 0 || ISBLANK(BilledHr), BLANK(), BilledHr)
Unbilled_Hours =
VAR UnbilledHr = CALCULATE(SUM(project_time[hours]), project_time[is_billed] = FALSE)
RETURN
IF(UnbilledHr = 0 || ISBLANK(UnbilledHr), BLANK(), UnbilledHr)
Total_Hours =
VAR TotalHr = [Billed_Hours] + [Unbilled_Hours]
RETURN
IF(
ISBLANK([Billed_Hours]) && ISBLANK([Unbilled_Hours]),
BLANK(),
TotalHr
)
Explanation:
BLANK()
accordingly.BLANK()
will not display, as Power BI hides rows where all measures are blank.Additional Tips:
Benefits:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
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 |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |