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
Deepak3Arora
Frequent Visitor

Create Subset of Data - Group by Month

Hi Team,

 

Hw can I create a DAX/any other way in Power BI to create a subset of Data as a Table in the form of Matrix.

 

I Dont need to show it as Visualization but Have this Data in Table Form to perform further round of actions on them.

 

Base Data is

ID       Status     Month

1OpenJanuary
2OpenJanuary
3OpenFebruary
4ClosedJanuary
5ClosedFebruary
6OpenMarch
7OpenApril
8ClosedApril
9ClosedApril
10ClosedMay

 

Needed as 

Month      Open Closed

January22
February11
March10
April12
May01

 

Regards,

Deepak

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

Hi @Deepak3Arora ,

 

Please create the new table.

 

Table 2 =
SUMMARIZE (
    'Table',
    'Table'[Month],
    "Open",
        CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[Status] = "Open" ) + 0,
    "Closed",
        CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[Status] = "Closed" ) + 0
)

vkkfmsft_0-1660721033668.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

5 REPLIES 5
v-kkf-msft
Community Support
Community Support

Hi @Deepak3Arora ,

 

Please create the new table.

 

Table 2 =
SUMMARIZE (
    'Table',
    'Table'[Month],
    "Open",
        CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[Status] = "Open" ) + 0,
    "Closed",
        CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[Status] = "Closed" ) + 0
)

vkkfmsft_0-1660721033668.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

haseebsuhail943_1-1660309221722.png

Open = CALCULATE(COUNTROWS(your_table),your_table[Status]="Open")
closed = CALCULATE(COUNTROWS(your_table),your_table[Status]="Closed")


Hi Suhaib,

 

Sorry If i confused you but I need to have this data in a Table to perform more actions on it rather than showing in the visualization.

 

Regards

Deepak

amitchandak
Super User
Super User

@Deepak3Arora , Use matrix visual,

 

Month on row, Status on column and count of id values

Hello Amit,

 

I need to save the data as a subset and not visualization.

 

Regards,

Deepak

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.