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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Multiple column from a single column

I want to create table visual with multiple column from a single field

Eg: from the below table 

emil1_0-1658819736765.png

I want distict value from day field for each status in Multiple columns.

table visual should looks like below

emil1_1-1658819861445.png

 

Please help. Thanks in Advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

You can use the following calculated table expression to group your table records into different category columns based on 'status' and 'day' fields:

NewTable = 
FILTER (
    SELECTCOLUMNS (
        GENERATESERIES ( 1, 7, 1 ),
        "Index", [Value],
        "Full",
            LOOKUPVALUE (
                'Table'[day],
                'Table'[Status], "Full",
                'Table'[day], FORMAT ( [Value], "dddd" ),
                BLANK ()
            ),
        "Half",
            LOOKUPVALUE (
                'Table'[day],
                'Table'[Status], "Half",
                'Table'[day], FORMAT ( [Value], "dddd" ),
                BLANK ()
            ),
        "Quarter",
            LOOKUPVALUE (
                'Table'[day],
                'Table'[Status], "Quarter",
                'Table'[day], FORMAT ( [Value], "dddd" ),
                BLANK ()
            )
    ),
    [Full] & [Half] & [Quarter]
        <> BLANK ()
)

1.png

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Add an index column in power query

Power Query- Index Column: https://youtu.be/NS4esnCDqVw

 

Create this new column in DAX

Row = countx(filter(Table, [Status] = earlier([Status]) && [Index] <= earlier([Index]) ) , [Index])

 

Create a Matrix, Use Row on Row , Status on Column and Max of day as value

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Its working but still have a problem, 

It showing repeated values in each column, need to display distinct values only.

And i couldnt find Max of Day, there are first,last,count,count(distict) options only

 

Anonymous
Not applicable

Hi @Anonymous,

You can use the following calculated table expression to group your table records into different category columns based on 'status' and 'day' fields:

NewTable = 
FILTER (
    SELECTCOLUMNS (
        GENERATESERIES ( 1, 7, 1 ),
        "Index", [Value],
        "Full",
            LOOKUPVALUE (
                'Table'[day],
                'Table'[Status], "Full",
                'Table'[day], FORMAT ( [Value], "dddd" ),
                BLANK ()
            ),
        "Half",
            LOOKUPVALUE (
                'Table'[day],
                'Table'[Status], "Half",
                'Table'[day], FORMAT ( [Value], "dddd" ),
                BLANK ()
            ),
        "Quarter",
            LOOKUPVALUE (
                'Table'[day],
                'Table'[Status], "Quarter",
                'Table'[day], FORMAT ( [Value], "dddd" ),
                BLANK ()
            )
    ),
    [Full] & [Half] & [Quarter]
        <> BLANK ()
)

1.png

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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