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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Grouping into a new table

Hello,

I have in the moment a "blackout"!

I need help to following problem:

I have a table:

dateCapaClosing 30 Day
2021-12123yes
2021-11124yes
2021-11532no
2021-1136yes
2021-11574yes
2021-1245875no
2021-1288yes
2021-12546yes
2021-12463yes
2021-12364no
2021-124374yes
2021-0847yes
2021-0858yes
2021-08589yes
2021-086964no
2021-08489yes
2021-08499yes

 

FWil_0-1656528884963.png

 

 

 

 

I want to create the followingtable with a DAX function

 

dateClosing 30 Day yesClosing 30 Day no
2021-0851
2021-1131
2021-1252

 

FWil_1-1656528933105.png

 

 

 

Thanks for help

Friedbert

1 ACCEPTED SOLUTION
vapid128
Solution Specialist
Solution Specialist

image.png

Table5 = 
SUMMARIZE(
    Table4,
    Table4[date],
    "Closing 30 Day yes",CALCULATE(COUNTROWS(Table4),FILTER(Table4,Table4[Closing 30 Day]="yes")),
    "Closing 30 Day no",CALCULATE(COUNTROWS(Table4),FILTER(Table4,Table4[Closing 30 Day]="no"))
)

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi,

Please try the below.

It is for creating a new table.

 

Untitled.png

 

New Table = 
GENERATE (
    VALUES ( Data[Date] ),
    {
        ( CALCULATE (
            COUNTROWS (
                FILTER (
                    SELECTCOLUMNS ( Data, "@Closing30dayYes", Data[Closing 30 Day] ),
                    [@Closing30dayYes] = "Yes"
                )
            )
        ), CALCULATE (
            COUNTROWS (
                FILTER (
                    SELECTCOLUMNS ( Data, "@Closing30dayNo", Data[Closing 30 Day] ),
                    [@Closing30dayNo] = "No"
                )
            )
        ) )
    }
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thank you very much, it woorks.

vapid128
Solution Specialist
Solution Specialist

image.png

Table5 = 
SUMMARIZE(
    Table4,
    Table4[date],
    "Closing 30 Day yes",CALCULATE(COUNTROWS(Table4),FILTER(Table4,Table4[Closing 30 Day]="yes")),
    "Closing 30 Day no",CALCULATE(COUNTROWS(Table4),FILTER(Table4,Table4[Closing 30 Day]="no"))
)
Anonymous
Not applicable

Thank you very much, it woorks.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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