March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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:
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
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.
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.
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:
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
@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:
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
81 | |
62 | |
54 | |
41 |
User | Count |
---|---|
194 | |
106 | |
90 | |
63 | |
51 |