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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Salesforce
Frequent Visitor

Multiple Column having filter

Hello Team,

Can anyone help me with the scenario or example related? I'm new to power bi and learning.

We had a requirement to create filter data for multiple columns.

The Scenario is companies get their contracts renewed every 3 years. If they don't want to renew then it will be considered discontinued. Any help very much appreciated.

Columns as --Company Name,Date of issue,Status(Active,Expired,Discontinue),Category(New,End Of cycle-3years) ,ID'setc.

The issue is when the company has completed its contract for 3 years -and renewed.. they were generated with new IDs and categories as New.

For Example - Company A, Company B, Company C

Company NameStatusDate of IssueIDCategory
Company AExpired07/15/2019IDAEnd of Cycle 
Company BActive08/08/2020IDBNew
Company CDiscontinued08/06/2018IDCEnd of Cycle
     

 

Table 2 :

Company NameStatusDate of IssueIDCategory 
Company AActive07/16/2022IDA1New 
Company BActive08/08/2020 IDBNew 
Company CDiscontinued08/06/2018IDCEnd of Cycle 

 

Company D

Active08/08/2022IDDNew 

Company A was created on the year 07/15/2019 -completed the 3 years cycle on 7/14/2022 -Their ID was given as ID A.Status is Expired.

Now Company A went for renewal in the year 2022. Their ID was generated New as !D A1.Status as Active and Category as New.

Similarly, other companies got discontinued in between, etc. New companies took new contracts.

How do I filter to know which company has completed 3 years of cycle and went for renewal? Which are new clients for this year etc.

Any help is Very much appreciated.Thank you in advance.

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

Hi @Salesforce ,

 

Please try:

Create two measures:

New = 
var _a = CALCULATE(COUNT('Table'[Company Name]),FILTER('Table',[Company Name]=MAX('Table 2'[Company Name])))
return IF(MAX('Table 2'[Status])="Active"&&_a=BLANK(),1,0)

Renew = 
var _a = CALCULATE(MAX('Table'[Status]),FILTER('Table',[Company Name]=MAX('Table 2'[Company Name])))
return IF(MAX('Table 2'[Status])="Active"&&_a="Expired",1,0)

Then create two table visuals(using 'Table 2'[Company Name]) and apply these measures to the visuals(one by one):

vjianbolimsft_0-1663726860330.png

vjianbolimsft_1-1663726875304.png

Then turn on the title of these visuals:

vjianbolimsft_2-1663726936552.png

vjianbolimsft_3-1663726950072.png

Final output:

vjianbolimsft_4-1663726966684.png

 

 

 

 

Best Regards,

Jianbo Li

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

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @Salesforce ,

 

Please try:

Create two measures:

New = 
var _a = CALCULATE(COUNT('Table'[Company Name]),FILTER('Table',[Company Name]=MAX('Table 2'[Company Name])))
return IF(MAX('Table 2'[Status])="Active"&&_a=BLANK(),1,0)

Renew = 
var _a = CALCULATE(MAX('Table'[Status]),FILTER('Table',[Company Name]=MAX('Table 2'[Company Name])))
return IF(MAX('Table 2'[Status])="Active"&&_a="Expired",1,0)

Then create two table visuals(using 'Table 2'[Company Name]) and apply these measures to the visuals(one by one):

vjianbolimsft_0-1663726860330.png

vjianbolimsft_1-1663726875304.png

Then turn on the title of these visuals:

vjianbolimsft_2-1663726936552.png

vjianbolimsft_3-1663726950072.png

Final output:

vjianbolimsft_4-1663726966684.png

 

 

 

 

Best Regards,

Jianbo Li

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

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.