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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
rcister
Frequent Visitor

rocio

Ey guys! how are you?
I need your help, I have this mesuare:

FILTER RoomN =
SWITCH(TRUE(),
SELECTEDVALUE('Filter 2'[Colum1]) = "Budget", [Budget RoomNights],
SELECTEDVALUE('Filter 2'[Colum1]) = "Forecast", [Forescast RoomNigths],
SELECTEDVALUE('Filter 2'[Colum1]) = "STLY", [STLY RoomNigths]
)

I need to be able to chose more the one choice.
E.G:  I need to be able choose budget and STLY or STLY and forecast or any other option.
Can you help me? Best Regards
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@rcister , if more than one is selected then you want to add values?

 

Try like

 

FILTER RoomN =

if(countx(filter('Filter 2','Filter 2'[Colum1] = "Budget"),'Filter 2'[Colum1])>0, [Budget RoomNights],blank())+
if(countx(filter('Filter 2','Filter 2'[Colum1] = "Forecast"),'Filter 2'[Colum1])>0, [Forescast RoomNigths],blank())+
if(countx(filter('Filter 2','Filter 2'[Colum1] = "STLY"),'Filter 2'[Colum1])>0, [STLY RoomNigths],blank())

 

or explore Calculation groups
https://docs.microsoft.com/en-us/analysis-services/tabular-models/calculation-groups?view=asallprodu...

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@rcister , if more than one is selected then you want to add values?

 

Try like

 

FILTER RoomN =

if(countx(filter('Filter 2','Filter 2'[Colum1] = "Budget"),'Filter 2'[Colum1])>0, [Budget RoomNights],blank())+
if(countx(filter('Filter 2','Filter 2'[Colum1] = "Forecast"),'Filter 2'[Colum1])>0, [Forescast RoomNigths],blank())+
if(countx(filter('Filter 2','Filter 2'[Colum1] = "STLY"),'Filter 2'[Colum1])>0, [STLY RoomNigths],blank())

 

or explore Calculation groups
https://docs.microsoft.com/en-us/analysis-services/tabular-models/calculation-groups?view=asallprodu...

this part it said mistake
>0, [Budget RoomNights],blank())+

>0, [Forescast RoomNigths],blank())+

>0, [STLY RoomNigths],blank())

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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