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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
carlol
Helper IV
Helper IV

Add another value to The Slicers Selected Value

Hi 

 

I have a Slicer -- illustrates Names, i.e. Monday , Tuesday , Wednesday ; only one day is allowed to be selected by the user

I can capture the users selection using DAX SELECTEDVALUE

 

In addtion to illustrating the % associated with the Users Selection , I always want to illustrate Fridays data regardless of Slicer selection

 

If a User Selects Monday in the Slicer , I want to illustrate Monday and Friday Data

If a User Selects Thursday in the Slicer , I want to illustrate Thursday and Friday Data

 

Some attempts -- I cannot get to work 

 

measure = VAR _Sel = SELECTEDVALUE ('IHFD DimHospital'[HospID])  -- Can I add in ID 9999 here , using union or ||
VAR _Table = CALCULATETABLE ( VALUES ('IHFD DimHospital'[HospID]),'IHFD DimHospital'[HospID] = _Sel)
RETURN
CALCULATE ('IHFD vwKPI'[%] ,_Table)
 
measure = VAR _Sel = Union(ALLSELECTED('IHFD DimHospital'[HospID]),ROW("HospID","9999"))
VAR _Table = CALCULATETABLE ( VALUES ('IHFD DimHospital'[HospID]),'IHFD DimHospital'[HospID] in _Sel)
RETURN
CALCULATE ('IHFD vwKPI'[%] ,_Table)
 

measure = VAR _Sel = SELECTEDVALUE ('IHFD DimHospital'[HospID])
VAR _Table = CALCULATETABLE ( VALUES ('IHFD DimHospital'[HospID]),'IHFD DimHospital'[Hospital] = _Sel)
VAR _TableN = CALCULATETABLE ( VALUES ('IHFD DimHospital'[HospID]),'IHFD DimHospital'[Hospital] = "9999")
VAR _TableAll =Union(_Table,_TableN)
RETURN
UNION(CALCULATE ('IHFD vwKPI'[%] ,_TableALL)
 
measure = VAR _Sel = SELECTEDVALUE ('IHFD DimHospital'[HospID])
VAR _Table = CALCULATETABLE ( VALUES ('IHFD DimHospital'[HospID]))
RETURN
CALCULATE ('IHFD vwKPI'[%] ,_Table, FILTER(_table,'IHFD DimHospital'[HospID]= _Sel),FILTER(_Table,'IHFD DimHospital'[HospID] ="9999"))

 

 

 

 

 

 

 

 

 

3 REPLIES 3
v-yingjl
Community Support
Community Support

Hi @carlol ,

I have notcied that you have posted simliar issues and I have tried to help you to solve this, check the previous post reply whether it could help you. If not, please kindly let me know to help you better.

https://community.powerbi.com/t5/Desktop/Filter-to-always-show-one-value-irrespective-of-the-filter/...

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

AlB
Community Champion
Community Champion

Hi @carlol 

This will give you a table with Friday plus the other day selected, whereTable1[Day] column use for the slicer

VAR resSlicer_ = FILTER(ALL(Table1[Day]), Table1[Day] IN {"Fri", SELECTEDVALUE(Table1[Day])})

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

Thanks

 

Does not work , still just illustrates the Selected Value

 

measure = VAR _Sel = FILTER(ALL('IHFD vwKPI'[HospID]), 'IHFD vwKPI'[HospID]IN{"9999",SELECTEDVALUE ('IHFD vwKPI'[HospID])})
VAR _Table = CALCULATETABLE ( VALUES ('IHFD vwKPI'[HospID]),'IHFD vwKPI'[HospID] IN _Sel)
 
RETURN
CALCULATE ('IHFD vwKPI'[%] ,_Table)

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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