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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.