Forum Discussion
Anonymous
7 years agoNot applicable
filtering matrix by columns
Hi, I have a matrix like this (column month row client id and value sales) and I want to filter only the rows which has non blank in each column (1000006861 and 1000011110 would be filtered) ...
- 7 years ago
Anonymous
Try placing this measure in a card visual:
BoughtInEneroAndFebrero = VAR _BoughtInEnero = CALCULATETABLE ( DISTINCT ( Table1[IDCLIENTE] ), Table1[MES] = "Enero" ) VAR _BoughtInFebrero = CALCULATETABLE ( DISTINCT ( Table1[IDCLIENTE] ), Table1[MES] = "Febrero" ) RETURN COUNTROWS ( INTERSECT ( _BoughtInEnero, _BoughtInFebrero ) )I'm assuming that an IDCLIENTE will only come up in the table for a specific month if there have been sales (i.e. it cannot be the case that you have a blank in IMPORTE
AlB
7 years agoCommunity Champion
Anonymous
Try placing this measure in a card visual:
BoughtInEneroAndFebrero =
VAR _BoughtInEnero =
CALCULATETABLE ( DISTINCT ( Table1[IDCLIENTE] ), Table1[MES] = "Enero" )
VAR _BoughtInFebrero =
CALCULATETABLE ( DISTINCT ( Table1[IDCLIENTE] ), Table1[MES] = "Febrero" )
RETURN
COUNTROWS ( INTERSECT ( _BoughtInEnero, _BoughtInFebrero ) )
I'm assuming that an IDCLIENTE will only come up in the table for a specific month if there have been sales (i.e. it cannot be the case that you have a blank in IMPORTE
Anonymous
7 years agoNot applicable
AlB Thanks! It works. Finally do you know how can I add a month slicer in the same scenario to make it dinamically? Because that measure has "Enero" and "Febrero" hardcoded. Would it be possible to do it with a slicer?
Thank you! You helped me a lot