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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Cristina893
Regular Visitor

Group a column status with text by Month (group a conditional column)

Hi,

 

I have a table with invoice status by week, I want to get the Invoice status by month.

If any week within a month have the "Invoice Week Status" Not Approved than all the rows in the column "Invoice Status by Month" shoud be Not Approved.

pictur.png

 

Thanks a mil!

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Cristina893 , Try a new column like

 

if(isblank(countx(filter(table, [month] =earlier([Month]) && [Invoice Status by week] = "Not Approved"),[Invoice Status by week])),"Approved", "Not Approved")

 

if needed add

 

&& [Invoice_no] =earlier([Invoice_no])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Hi  @Cristina893  ,

I created some data:

v-yangliu-msft_0-1612744529784.png

Here are the steps you can follow:

1. Create calculated column.

Invoice Status by Month = IF(
 "Not Approved" in SELECTCOLUMNS(FILTER('Table',[Year+Month]=EARLIER('Table'[Year+Month])),"1",[invoice Status by week]),
    "Not Approved","Invoice Approved")

2. Result.

v-yangliu-msft_1-1612744529791.jpeg

 

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

2 REPLIES 2
Anonymous
Not applicable

Hi  @Cristina893  ,

I created some data:

v-yangliu-msft_0-1612744529784.png

Here are the steps you can follow:

1. Create calculated column.

Invoice Status by Month = IF(
 "Not Approved" in SELECTCOLUMNS(FILTER('Table',[Year+Month]=EARLIER('Table'[Year+Month])),"1",[invoice Status by week]),
    "Not Approved","Invoice Approved")

2. Result.

v-yangliu-msft_1-1612744529791.jpeg

 

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@Cristina893 , Try a new column like

 

if(isblank(countx(filter(table, [month] =earlier([Month]) && [Invoice Status by week] = "Not Approved"),[Invoice Status by week])),"Approved", "Not Approved")

 

if needed add

 

&& [Invoice_no] =earlier([Invoice_no])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors