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
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

Click here to schedule a short Teams meeting to discuss your question.

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
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.