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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dynamic Filtering Value With Different Conditions

Hai All Need your help on this please help me.

This is my target table attached below

Target Table  
Group YearTarget
India20223
Japan20223
Russia20223
Ukraine20223
UK20222
FRANCE20223

I am trying to find a value in single visual with different conditions
And Below i am attaching requirement Screenshot and I Explained 4 Conditions Aswell  please help me

alanpjames_1-1651164559795.png

Thanks

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Target 2 =
IF (

|| HASONEVALUE ( 'Mapping Area'[Cluster/Function] )
|| HASONEVALUE ( 'Calendar'[Year] ),
SWITCH (
TRUE (),
&& ISFILTERED ( 'Mapping Area'[Cluster/Function] )
&& ISFILTERED ( 'Calendar'[Year] ), SUM ( Targets[CLT/FLT TARGET 2 STARS] ),
|| ISFILTERED ( 'Mapping Area'[Cluster/Function] ), [FLT],
ISFILTERED ( 'Calendar'[Year] ), SUM ( Targets[CLT/FLT TARGET 2 STARS] )
),
IF ( CALCULATE ( NOT ISCROSSFILTERED ( 'Targets' ) ), [FLT] )
)

View solution in original post

Anonymous
Not applicable

Target =
IF (

|| HASONEVALUE ( 'Mapping Area'[Cluster/Function] )
|| HASONEVALUE ( 'Calendar'[Year] ),
SWITCH (
TRUE (),
&& ISFILTERED ( 'Mapping Area'[Cluster/Function] )
&& ISFILTERED ( 'Calendar'[Year] ), SUM ( Targets[CLT/FLT TARGET 2 STARS] ),
|| ISFILTERED ( 'Mapping Area'[Cluster/Function] ), [FLT],
ISFILTERED ( 'Calendar'[Year] ), SUM ( Targets[CLT/FLT TARGET 2 STARS] )
),
IF ( CALCULATE ( NOT ISCROSSFILTERED ( 'Targets' ) ), [FLT] )
)

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Target 2 =
IF (

|| HASONEVALUE ( 'Mapping Area'[Cluster/Function] )
|| HASONEVALUE ( 'Calendar'[Year] ),
SWITCH (
TRUE (),
&& ISFILTERED ( 'Mapping Area'[Cluster/Function] )
&& ISFILTERED ( 'Calendar'[Year] ), SUM ( Targets[CLT/FLT TARGET 2 STARS] ),
|| ISFILTERED ( 'Mapping Area'[Cluster/Function] ), [FLT],
ISFILTERED ( 'Calendar'[Year] ), SUM ( Targets[CLT/FLT TARGET 2 STARS] )
),
IF ( CALCULATE ( NOT ISCROSSFILTERED ( 'Targets' ) ), [FLT] )
)

Anonymous
Not applicable

Hi @Anonymous ,

The sample data you gave does not have a column named FLT, is this a column that actually exists in the table or do I need to create a calculated column to get it?

yingyinr_2-1651479856840.png

Also, you mentioned that if 2022 is selected, only the data for 2 stars is aggregated. In that case, there is only one record that meets the requirement as shown below. So if the user selects another year, how will it be calculated?

yingyinr_1-1651479786062.png

Best Regards

Anonymous
Not applicable

Actually, I found the solution

Anonymous
Not applicable

Hi @Anonymous ,

It's glad to hear that your problem has been resolved. If it is convenient, would you like to share your solution here? And mark your post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thanks for your time and sharing in advance.

Best Regards

Anonymous
Not applicable

Target =
IF (

|| HASONEVALUE ( 'Mapping Area'[Cluster/Function] )
|| HASONEVALUE ( 'Calendar'[Year] ),
SWITCH (
TRUE (),
&& ISFILTERED ( 'Mapping Area'[Cluster/Function] )
&& ISFILTERED ( 'Calendar'[Year] ), SUM ( Targets[CLT/FLT TARGET 2 STARS] ),
|| ISFILTERED ( 'Mapping Area'[Cluster/Function] ), [FLT],
ISFILTERED ( 'Calendar'[Year] ), SUM ( Targets[CLT/FLT TARGET 2 STARS] )
),
IF ( CALCULATE ( NOT ISCROSSFILTERED ( 'Targets' ) ), [FLT] )
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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