Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi guys,
I have an issue using matrix in PBI.
I'd like to remove my row when it has value 0 becaume my report becomes too long with many rows without values as you can see from the sreenshot.
Do you know how to do it please?
I had to put measures in rows instead of in columns but now I'm sutck here.
Thank you very much!!
Solved! Go to Solution.
Hi @pasno ,
I looked at the structure in detail and realized that Trasporti and Magazzino are one and the same in matrix, and even with filters they can not change.
So I think it is more difficult to try to implement it in matrix, but it would be easier to choose table visual.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@pasno Can you use the Filters pane?
thank you for your answer.
I did it but removing blank rows it remover also customers that has a value on "Trasporti" (first row) and not in "Magazzino" (second row).
So I lose some sustomers from the list and I get only the ones that have some values in "Magazzino"...
Hi @pasno ,
To remove rows with a value of 0 in Power BI without affecting other data, you can use a filter on your matrix visual.
Firstly you can create a new measure that will check for non-zero values in the columns.
NonZeroCheck =
IF ( [Passivo Trasporti] > 0 || [Passivo Magazzino] > 0, TRUE, FALSE )
This measure returns TRUE if there’s a non-zero value in either “Passivo Trasporti” or “Passivo Magazzino”. Add this measure to the filters pane in your matrix visual. Set the filter to show items when NonZeroCheck is TRUE.
This way, you will keep rows where either “Passivo Trasporti” or “Passivo Magazzino” has a non-zero value, ensuring that customers with values in “Trasporti” are not removed when “Magazzino” is zero.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yilong-msft ,
thank you for your feedback.
I understand your answer but I need to remove the row "Passivo Magazzino" every time it is 0.
For one customer that has a value in "Trasporti" but 0 in "Magazzino" I need to see just one line with the value but not the "Magazzino" line if it's 0.. This idea is not working ;-(
Hi @pasno ,
To remove rows with a value of 0 in Power BI, I think you can click on the matrix visual where you want to apply the filter. Go to the Filters pane on the right side of the report canvas. Under the Visual level filters, find the “Passivo Magazzino” field. Set the filter to show items when the value is not equal to 0.
For the scenario where you have a customer with a value in “Trasporti” but 0 in “Magazzino”, and you want to display only the “Trasporti” line, you would need to apply a similar filter to the “Passivo Magazzino” field. However, if these are two separate fields and you want to maintain the visibility of “Trasporti” values, you might need to consider creating a measure that checks the value of “Magazzino” and only returns the “Trasporti” value if “Magazzino” is 0.
Here is a change about the DAX code.
Trasporti Value =
IF(
SUM('Table'[Passivo Magazzino]) = 0,
SUM('Table'[Passivo Trasporti]),
BLANK()
)
If you can provide me about your .pbix file, I will have a further study.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thank you again for your support.
I'm still stuck also with this solution. Please find below the pbix in which ou can find one customer that has this feature (so a value in "Trasporti" but not in "Magazzino").
I'd like to see only the row with the value and not the one with 0.
Thank you very very much again,
Daniele
Hi @pasno ,
I opened your .pbix file but I do not know which Measure should I select. When I select all of the Trasporti and Magazzino, it gives me blank on Magazzino,with no zero on Magazzino but has number on Trasporti . Colud you tell me more about this?
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
in the pbix you can fine one customer "Acqua" with the two metrics that shows the costs (Passivo trasporti and Passivo Magazzino).
This is the case in which I have a value only in the "Trasporti" area but not in the "Magazzino" one, so I expect to see just one row, the one with values.
But if I add a filter to remove "Passivo Magazzino" when it's 0 or null it doesn't work!
Hi @pasno ,
I looked at the structure in detail and realized that Trasporti and Magazzino are one and the same in matrix, and even with filters they can not change.
So I think it is more difficult to try to implement it in matrix, but it would be easier to choose table visual.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank again for your feedback. The only reason I'm trying to do this is to have a vertical table instead of an horizontal one 🙂
Talk to you soon and have a nice day!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
87 | |
66 | |
52 | |
45 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |