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
Mo_
Frequent Visitor

Matrix visual row grand total too large

Hi all,

 

I have created a matrix visual in which I display some images of products, among other things. I don't want an image to be shown in the row grand total on the bottom, so I created the following measure for it:

 

MaxPictureURL = 
Var Pic = MAX( DIM_item[PictureURL] )

Return
SWITCH(
    TRUE(),
    HASONEVALUE( DIM_item[ItemColorID] ), Pic,
    BLANK()
)

 

It works, there is no image in the row grand total. However, the row grand total becomes very large in terms of the height as you can see in the screenshot:

 

Mo__2-1709305037537.png

 

The yellow area is white space that has no use and I want it to disappear so that there is only an area left that is the height of the green area.

 

There seems to be an invisible "ghost image" in the row grand total, since the height of the yellow area seems to depend on the image size I choose. By default that is 75x75 px. If I reduce it to 20x20 px, the yellow area gets smaller, but the images in the matrix visual as well, which is not what I want.

 

Any advice on how I can reduce the yellow area in another way?

 

Cheers

4 REPLIES 4
v-yohua-msft
Community Support
Community Support

Hi, @Mo_ 

 

You can try adjusting the row padding, and in the matrix visual, you can customize the padding of the rows. Reducing the underfill of rows may help minimize unnecessary space. To do this, go to the Format pane in the matrix visual, expand Grid, and adjust the Option option. You can reduce the space taken up by rows globally.

 

vyohuamsft_0-1709538463097.png

 

If the font size is too large, it can also affect the leading, but reducing the font size of the total line with conditional formatting can visually minimize the impact.

 

vyohuamsft_1-1709538653516.png

 

vyohuamsft_2-1709538699445.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yohua-msft ,

thank you, I have tried your suggestions, but none of them work unfortunately.

As mentioned above, adjusting the image size seems to be the only way to adjust the height:

 

Mo__0-1709539368058.png

 

Mo__1-1709539452254.png

 

However, if I change the image size to 20x20 px, the images in the rows above the grand total, which I want to show, become so tiny that no user would be able to recognize a thing, so that is not a feasable option.

 

Edit: Don't you think it could be some kind of bug? It seems strange to me that even though no image is shown in the grand total row, the image size does impact the height of the row. Power BI seems to put an image into the grand total row, regardless of my measure, and makes it invisible. In my mind the correct behaviour would be to not put an image into the row at all. Unless my measure is wrong, of course - my DAX is by far not the best.

 

Cheers

amitchandak
Super User
Super User

@Mo_ , Try like

 

Sumx(values(DIM_item[ItemColorID]), calculate(
SWITCH(
TRUE(),
HASONEVALUE( DIM_item[ItemColorID] ), MAX( DIM_item[PictureURL] ),
BLANK()
)) )

@amitchandak Thanks for your reply.

When I paste your suggestion into the measure, the matrix visual cannot be displayed. The error message is: 

 

Mo__0-1709537495861.png

 

The column DIM_item[ItemColorID] is formatted as data type and format "whole number", so I don't understand why your suggestion doesn't work.

Do you know what's happening or do you have another suggestion?

 

Cheers

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.