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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
FGaspar
Helper I
Helper I

How to hide columns with empty values in a matrix visual.

Hi,

 

I'm trying to hide empty values in a matrix visual.

In the example below I have two measures for each month/year. If both measures are empty in the same month (for all rows), that month shoudn't be visible. If all months don't have values, the year shouldn't be visible:

MatrixVisual_ClearEmptyValues.png

 

I read another similar posts, but didn't found any solution.

 

 

Best regards,

Filipe Gaspar

1 ACCEPTED SOLUTION

@FGaspar - Yes, you can do this like:

 

Measure =
  VAR __Calc = <some calculation>
RETURN
  IF(__Calc=0,BLANK(),__Calc)

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@FGaspar , Try to modify measure like

 

new measure = if([measure]=0, blank(), [measure]) // your orginal measure

 and try

Greg_Deckler
Super User
Super User

@FGaspar - You cannot in your case because you have some 0's in those columns.

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler ,

 

Thanks for your reply.

 

Can I change the measure (I have a live connection to SSAS) to retrieve "blank" instead of "0"?

 

If so, can I hide the blank values?

@FGaspar - Yes, you can do this like:

 

Measure =
  VAR __Calc = <some calculation>
RETURN
  IF(__Calc=0,BLANK(),__Calc)

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Neither of the above proposed solutions above work if the values are null

@c-es That's why it is often a good idea to + 0 to any calculation if you need to check something like that.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.