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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.