Forum Discussion
Syndicate_Admin
Administrator
4 years agoProblem with SWITCH and HASONEFILTER conditionals applying it to the MassFilter display object
Hello, I explain my problem, I have a table on the canvas, which collects a number of inhabitants in 12 cities, these amounts are collected either from a What iF of each city where I manually put tho...
v-yanjiang-msft
Community Support
4 years agoHi Syndicate_Admin ,
According to your description, in my understanding, if the Cant DNISelec get a value, take it ,else if it is empty then catch those that are in each What if of each city. If this is the case, you can try this measure.
Measure =
IF (
COUNTROWS ( 'tablaHabitantes'[DNI] ) + 0 <> 0,
COUNTROWS ( 'tablaHabitantes'[DNI] ),
SWITCH (
TRUE (),
MAX ( 'Cities-Values Pant'[Cities] ) = "MADRID", SelectMadrid[Madrid Value],
MAX ( 'Cities-Values Pant'[Cities] ) = "MADRID AM", 'SelectMadrid AM'[Madrid AM Value],
MAX ( 'Cities-Values Pant'[Cities] ) = "BARCELONA", SelectBarcelona[Value Barcelona],
MAX ( 'Cities-Values Pant'[Cities] ) = "BARCELONA AM", 'SelectBarcelona AM'[Value Barcelona AM],
MAX ( 'Cities-Values Pant'[Cities] ) = "VALENCIA", 'SelectValencia'[Valencia Value],
MAX ( 'Cities-Values Pant'[Cities] ) = "SEVILLE", 'SelectSevilla'[Value SEVILLA],
MAX ( 'Cities-Values Pant'[Cities] ) = "MALAGA", 'SelectMálaga'[Malaga Value],
MAX ( 'Cities-Values Pant'[Cities] ) = "MARBELLA", 'SelectMarbella'[SelectMarbella Value],
MAX ( 'Cities-Values Pant'[Cities] ) = "CORDOBA", 'SelectCórdoba'[SelectCordoba Value],
MAX ( 'Cities-Values Pant'[Cities] ) = "GRANADA", 'SelectGranada'[Select ValueGranada],
MAX ( 'Cities-Values Pant'[Cities] ) = "BILBAO", 'SelectBilbao'[SelectBilbao Value],
MAX ( 'Cities-Values Pant'[Cities] ) = "VITORIA", 'SelectVitoria'[SelectVitoria Value],
BLANK ()
)
)
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.