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

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.


Go to My LinkedIn Page


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
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.

Top Solution Authors