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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors