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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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