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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.