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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AlanP514
Post Patron
Post Patron

Dynamic Value

Hai Guys Need help on this.
Requirement
I Have a Year slicer and a group slicer( Two slicers) year slicer are have the different years from 2018 to 2022
In the target table, the year column only has 2022, and different groups like this

Group YearTarget
India20223
Japan20223
Russia20223
Ukraine20223
UK20222
FRANCE20223

One condition > My manager wants to see if he doesn't select any filter(slicer) he wants to see a static value "10" otherwise that particular group value. 
2nd Condition > If he directly selects 2022 or any year without group slicer he wants to see the static value "0 ".
But He wants to see the actual target value when he selects that particular year with a particular group only
Please help with this.




2 REPLIES 2
Jihwan_Kim
Super User
Super User

Picture1.png

 

Target based on a condition: =
IF (
    HASONEVALUE ( Data[Group ] ),
    SWITCH (
        TRUE (),
        ISFILTERED ( 'Group'[Group ] ) && ISFILTERED ( 'Year'[Year] ), SUM ( Data[Target] ),
        NOT ISFILTERED ( 'Group'[Group ] ) && ISFILTERED ( 'Year'[Year] ), 0,
        10
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Hai Jihwan Kim Thanks For the Solution.
But the requirement is something Different I will show you with mock data.

Target Table  
Group YearTarget
India20223
Japan20223
Russia20223
Ukraine20223
UK20222
FRANCE20223

Above attached is my target table.
And Below i am attaching requirement please help me

AlanP514_0-1651163976818.png
Thanks

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.