cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors