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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Want to represent this data as follows in a table visualization

I have the data as follows:
This is how I have the dataThis is how I have the dataThis is how i want the data to be represented in my visualizationThis is how i want the data to be represented in my visualizationAll of them are in a single table. How should i model the data or transform it so that I can achieve the desired result

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

I optimized the above method. And this is my PBIX file.

You can create your columns and measures like so:

columns:

Car = 
CALCULATE (
    MAX ( 'Table'[Name] ),
    FILTER ( ALLEXCEPT ( 'Table', 'Table'[car ID] ), 'Table'[Type] = "Car" )
)
Parts = 
IF (
    'Table'[Type] = "Parts",
    CALCULATE ( MAX ( 'Table'[Name] ), ALLEXCEPT ( 'Table', 'Table'[Parts ID] ) ),
    BLANK ()
)

measures:

Completion Date Measure = 
SWITCH (
    TRUE (),
    AND ( ISINSCOPE ( 'Table'[Parts] ), ISBLANK ( VALUES ( 'Table'[Parts] ) ) ), BLANK (),
    CALCULATE (
        MIN ( 'Table'[Completion Date] ),
        ALLEXCEPT ( 'Table', 'Table'[Car], 'Table'[Parts] )
    )
)
Owner Name Measure = 
SWITCH (
    TRUE (),
    AND ( ISINSCOPE ( 'Table'[Parts] ), ISBLANK ( VALUES ( 'Table'[Parts] ) ) ), BLANK (),
    MAX ( 'Table'[Owner Name] )
)

blank.PNG

Best Regards,

Icey

 

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

4 REPLIES 4
Icey
Community Support
Community Support

Hi @Anonymous ,

I optimized the above method. And this is my PBIX file.

You can create your columns and measures like so:

columns:

Car = 
CALCULATE (
    MAX ( 'Table'[Name] ),
    FILTER ( ALLEXCEPT ( 'Table', 'Table'[car ID] ), 'Table'[Type] = "Car" )
)
Parts = 
IF (
    'Table'[Type] = "Parts",
    CALCULATE ( MAX ( 'Table'[Name] ), ALLEXCEPT ( 'Table', 'Table'[Parts ID] ) ),
    BLANK ()
)

measures:

Completion Date Measure = 
SWITCH (
    TRUE (),
    AND ( ISINSCOPE ( 'Table'[Parts] ), ISBLANK ( VALUES ( 'Table'[Parts] ) ) ), BLANK (),
    CALCULATE (
        MIN ( 'Table'[Completion Date] ),
        ALLEXCEPT ( 'Table', 'Table'[Car], 'Table'[Parts] )
    )
)
Owner Name Measure = 
SWITCH (
    TRUE (),
    AND ( ISINSCOPE ( 'Table'[Parts] ), ISBLANK ( VALUES ( 'Table'[Parts] ) ) ), BLANK (),
    MAX ( 'Table'[Owner Name] )
)

blank.PNG

Best Regards,

Icey

 

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

 

 

 

Anonymous
Not applicable

I am using the Matrix visualization and have added Cars and Parts to the ROW section. Now I want the entire table to be filtered by 2 slicers. The values for them are contained in 2 separate tables. All the relationships have been set up correctly. When I try to slice the matrix using those filters all the other columns except the first one (Cars and Parts) filters. So basically I have all the values for column 1 and then for the rest of the columns, the values will appear as per the value selected in the slicer.

I would want the slicer selection to affect the first row as well and only display the values for the selection made. Can you please help me out with that

Anonymous
Not applicable

Thanks a lot. This solution worked for me!!!! 🙂

Icey
Community Support
Community Support

Hi @Anonymous ,

I can only get the result like below now. This is my PBIX file.

car.PNG

Best Regards,

Icey

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.