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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Mkrishna
Helper III
Helper III

Selecting dimension to show in matrix

Hi All, I hope you are doing well. I want to know if it is possible to have show selected dimension even if wihout value.

BrandFlavor/Size
XXX1L
XXX2L
XXX3L
YYY1L
YYY3L
YYY5L
ZZZApple
ZZZOrgane
ZZZWatermelon

 

 

 

In the above figure we can see that Brand XXX has 1L, 2L, 3L and Brand YYY has 1L, 3L and 5L. Similary, brand ZZZ has Apple, Orange, Watermelon.  Considering our data, we will have Size/Flavor dimension with attributes 1L, 2L, 3L, 5L, Apple, Orange, Watermelon.  But when I put in a matrix view I want this kind of table.

Mkrishna_0-1705029114219.png

 

The table should show all the 1L, 2L, 3L, 5L dimension for Brand XXX and Brand YYY but not for Brand ZZZ. Whereas Brand ZZZ should only  has its flavor and size and not other.Please guide

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

Hi @Mkrishna

Below is my table:

vxiandatmsft_0-1705652648580.png

The following DAX might work for you:

CustomDimensionTable = 
UNION(
    SELECTCOLUMNS(
        FILTER('Table', 'Table'[Brand] = "XXX" || 'Table'[Brand] = "YYY"),
        "Brand", 'Table'[Brand],
        "Dimension", 'Table'[Flavor]
    ),
    SELECTCOLUMNS(
        FILTER('Table', 'Table'[Brand] = "ZZZ"),
        "Brand", 'Table'[Brand],
        "Dimension", 'Table'[Flavor]
    )
)

The final output is shown in the following figure:

vxiandatmsft_1-1705652688861.png

Best Regards,

Xianda Tang

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

View solution in original post

2 REPLIES 2
v-xiandat-msft
Community Support
Community Support

Hi @Mkrishna

Below is my table:

vxiandatmsft_0-1705652648580.png

The following DAX might work for you:

CustomDimensionTable = 
UNION(
    SELECTCOLUMNS(
        FILTER('Table', 'Table'[Brand] = "XXX" || 'Table'[Brand] = "YYY"),
        "Brand", 'Table'[Brand],
        "Dimension", 'Table'[Flavor]
    ),
    SELECTCOLUMNS(
        FILTER('Table', 'Table'[Brand] = "ZZZ"),
        "Brand", 'Table'[Brand],
        "Dimension", 'Table'[Flavor]
    )
)

The final output is shown in the following figure:

vxiandatmsft_1-1705652688861.png

Best Regards,

Xianda Tang

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

Ritaf1983
Super User
Super User

Hi @Mkrishna 
If I understood you correctly try to use the option "show items with no data".

Ritaf1983_0-1705045630627.png

please show a desired result according to the tables that you used at a question or link to small pbix to work with

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

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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