Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Nikhil_567
Frequent Visitor

Hide a column if the SUM of the Values is 0

Hello Champs,

I am stuck in a situation where I have a scenerio like below-

Matrix VisualMatrix Visual

In the above image it's a matrix visual, where I have passed Date in Column, Attribute in Rows, and a calculated measure in Values.

If you look at the first column, which is April 2024, the Total is 0, and as per the requirement, I need to hide whenever a sum of column shows 0.

Can you please advise how can I achieve this?

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @Nikhil_567 ,

Please create a new measure like:

Measure = 
VAR __row_total = CALCULATE([YourMeasure],ALLEXCEPT('Table','Table'[Column]))
VAR __result = IF(__row_total<>0,[YourMeasure],BLANK())
RETURN
__result

Output:

vcgaomsft_0-1714963170787.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @Nikhil_567 ,

Please create a new measure like:

Measure = 
VAR __row_total = CALCULATE([YourMeasure],ALLEXCEPT('Table','Table'[Column]))
VAR __result = IF(__row_total<>0,[YourMeasure],BLANK())
RETURN
__result

Output:

vcgaomsft_0-1714963170787.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

VijayP
Super User
Super User

@Nikhil_567 

Create a Measure - 

CALCULATE(Measure in Values,FILTER('Table',[Measure in Values]<>0)) and use that in Values in Matrix
 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.